增加采集指定论文数的逻辑

master
pan 4 years ago
parent 5520d64b39
commit 192ea09162
  1. 5
      main.py

@ -135,7 +135,8 @@ def parse(content):
return params_list
base_url = 'https://libcon.bupt.edu.cn/http/77726476706e69737468656265737421f7b9569d2936695e790c88b8991b203a18454272'
suffix = '77726476706e69737468656265737421f7b9569d2936695e790c88b8991b203a18454272'
base_url = f'https://libcon.bupt.edu.cn/http/{suffix}'
profession = "计算机软件与理论"
keyword = f'(专业%3A"{profession}")'
headers = {
@ -318,7 +319,7 @@ def save(des, res, params):
# 万方平台论文采集
def run(max=10, last_page=100, page_size=20):
if max > last_page * page_size:
writeInfo(f'采集数不能超过{last_page*page_size}')
writeInfo(f'采集数不能超过{last_page * page_size}')
return
db.modify(f'delete from {sys_paper}')
db.modify(f'delete from {sys_word}')

Loading…
Cancel
Save