提交 13609e3d 作者: 薛凌堃

雪球网年报

上级 d30620e6
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
......@@ -35,8 +35,10 @@ chromedriver = r'D:/cmd100/chromedriver.exe'
browser = webdriver.Chrome(chrome_options=opt, executable_path=chromedriver)
log = baseCore.getLogger()
requests.adapters.DEFAULT_RETRIES = 3
cnx = pymysql.connect(host='114.116.44.11', user='caiji', password='f7s0&7qqtK', db='clb_project', charset='utf8mb4')
#11数据库
cnx = baseCore.cnx_
cursor = baseCore.cursor_
#144数据库
cnx_ = baseCore.cnx
cursor_ = baseCore.cursor
......@@ -159,7 +161,6 @@ def spider_annual_report(dict_info,num):
# name_pdf = f"{com_name}:{year}年年报.pdf".replace('*', '')
# name_pdf = pdf_name_a + '.pdf'
with cnx.cursor() as cursor:
if '年' in year:
year = year.split('年')[0]
else:
......@@ -245,7 +246,6 @@ def spider_annual_report(dict_info,num):
log.info(dic_result)
return False
# num = num + 1
time.sleep(2)
# browser.quit()
return True
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论