diff --git a/chromedriver.exe b/chromedriver.exe new file mode 100644 index 0000000..36291e1 Binary files /dev/null and b/chromedriver.exe differ diff --git a/engines/crawler_newscn_search.py b/engines/crawler_newscn_search.py index 13a69d0..3b6d3c3 100644 --- a/engines/crawler_newscn_search.py +++ b/engines/crawler_newscn_search.py @@ -7,6 +7,7 @@ import urllib.parse import json import time import re +import os BASE_URL = "https://english.news.cn" XINHUA_OVERSEAS_REGIONS = ["asiapacific", "europe", "africa", "northamerica"] @@ -116,7 +117,7 @@ class Crawler_NewsCN: invalid_chars_pattern = r'[\\/:*?"<>|]' blog_title = re.sub(invalid_chars_pattern, "", blog_title) - file = open(f"./saved_articles/Xinhua_{blog_title}.json", "w") + file = open(os.path.join("", "Xinhua_{blog_title}.json"), "w") json.dump(blog, file) file.close() time.sleep(2)