Skip to content

Commit

Permalink
👽🐛 bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
kaixinol committed Jul 31, 2024
1 parent 87bb1ee commit 8816790
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
proxy:
http: socks5://127.0.0.1:7890 # null
https: socks5://127.0.0.1:7890
http: socks5://127.0.0.1:7897 # null
https: socks5://127.0.0.1:7897
max_threads: 2
headful: 1
header:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/118.0.0.0 Safari/537.36
inject_js: "/media/Data/Project/twitter_user_tweet_crawler/script.js"
save: "/media/Data/Project/twitter_user_tweet_crawler/save"
save: "/mnt/data/Project/twitter_user_tweet_crawler/save"
user: plantgazer
2 changes: 1 addition & 1 deletion twitter_user_tweet_crawler/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_items_need_handle():
work_list.extend(get_multiple_browsers(config['headful'], headless=False))
wait_list = []
for i in work_list:
wait_list.append(tweet_executor.submit(i.get, 'https://twitter.com/404'))
wait_list.append(tweet_executor.submit(i.get, 'https://x.com/404'))
for ii in wait_list:
ii.result()
driver.get('https://twitter.com/404')
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions twitter_user_tweet_crawler/tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
from .util.config import config
from .util.sql import insert_new_record, is_id_exists

inject: str
inject_js = config.inject_js
with open(config.inject_js, 'r') as fp:
inject_js = Path(__file__).parent / 'script.js'
with open(inject_js, 'r') as fp:
inject = fp.read()


Expand Down

0 comments on commit 8816790

Please sign in to comment.