diff --git a/crawler.py b/crawler.py index 054581cb..d94b763c 100644 --- a/crawler.py +++ b/crawler.py @@ -253,7 +253,7 @@ def decode_url(url): "https": "{}://{}".format(proxy_type, proxy)} res = requests.get(init_url, proxies=proxies, headers=g_headers) - init_json = json.loads(res.text.replace(r"\'", ""), encoding='utf-8', strict=False) + init_json = json.loads(res.text.replace(r"\'", "").encode("utf-8"), strict=False) total_num = init_json['listNum'] target_num = min(max_number, total_num) @@ -280,7 +280,7 @@ def process_batch(batch_no, batch_size): print(e) return image_urls response.encoding = 'utf-8' - res_json = json.loads(response.text.replace(r"\'", ""), encoding='utf-8', strict=False) + res_json = json.loads(response.text.replace(r"\'", ""), strict=False) for data in res_json['data']: # if 'middleURL' in data.keys(): # url = data['middleURL'] diff --git a/image_downloader_gui.spec b/image_downloader_gui.spec index 00965418..31caad03 100644 --- a/image_downloader_gui.spec +++ b/image_downloader_gui.spec @@ -23,6 +23,6 @@ exe = EXE(pyz, a.datas, name='image_downloader_gui', debug=False, - strip=True, + strip=False, upx=True, console=False ) diff --git a/requirements.txt b/requirements.txt index 9a85cc25..cf30d9e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -chromedriver_autoinstaller==0.4.0 -PyQt5==5.15.9 -requests==2.22.0 -selenium==4.8.2 +chromedriver-autoinstaller==0.4.0 +pyinstaller==5.9.0 +PyQt5==5.15.9 +requests==2.28.2 +selenium==4.8.3