From 2f44e2d422f84939f5253e18fcffd186100fb928 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Tue, 11 Aug 2020 23:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index c85c41d..cc97b69 100644 --- a/main.py +++ b/main.py @@ -152,7 +152,7 @@ session.cookies.update(cookies) pdf_dir = 'pdf' html_dir = 'html' -executor = ThreadPoolExecutor(max_workers=2) +# executor = ThreadPoolExecutor(max_workers=1) # 向量表 sys_tfidf = 'sys_tfidf' # 论文表 @@ -329,7 +329,6 @@ def check(res): return False - # 万方平台论文采集 def run(max=10, last_page=100, page_size=20): if max > last_page * page_size: @@ -366,7 +365,7 @@ def run(max=10, last_page=100, page_size=20): count = count + 1 writeInfo(f'当前采集进度{count}/{max},{round(count / max, 4) * 100}%') if count <= max: - executor.submit(save, des, res, params) + save(des, res, params) if count == max: break else: