Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁双波
zzsn_spider
Commits
838272fc
提交
838272fc
authored
9月 18, 2023
作者:
薛凌堃
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
证监会年报维护
上级
c1b41f41
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
+4
-4
证监会-年报.py
comData/annualReport/证监会-年报.py
+4
-4
没有找到文件。
comData/annualReport/证监会-年报.py
浏览文件 @
838272fc
impor
t
json
impor
t
json
...
@@ -46,7 +46,7 @@ def RequestUrl(url, payload, item_id, start_time):
...
@@ -46,7 +46,7 @@ def RequestUrl(url, payload, item_id, start_time):
def
tableUpdate
(
year
,
name_pdf
,
type_id
,
item_id
,
group_name
,
path
,
full_path
,
category
,
file_size
,
order_by
,
status
,
def
tableUpdate
(
year
,
name_pdf
,
type_id
,
item_id
,
group_name
,
path
,
full_path
,
category
,
file_size
,
order_by
,
status
,
create_by
,
create_time
,
page_size
):
create_by
,
create_time
,
page_size
):
sel_sql
=
'''select item_id from clb_sys_attachment where item_id =
%
s and year =
%
s'''
sel_sql
=
'''select item_id from clb_sys_attachment where item_id =
%
s and year =
%
s
and type_id=1
'''
cursor_
.
execute
(
sel_sql
,
(
item_id
,
year
))
cursor_
.
execute
(
sel_sql
,
(
item_id
,
year
))
selects
=
cursor_
.
fetchone
()
selects
=
cursor_
.
fetchone
()
if
selects
:
if
selects
:
...
@@ -117,7 +117,7 @@ def SpiderByZJH(url, payload, dic_info, num, start_time):
...
@@ -117,7 +117,7 @@ def SpiderByZJH(url, payload, dic_info, num, start_time):
# page_size = 0
# page_size = 0
sel_sql
=
'''select item_id,year from clb_sys_attachment where item_id =
%
s and year =
%
s'''
sel_sql
=
'''select item_id,year from clb_sys_attachment where item_id =
%
s and year =
%
s
and type_id=1
'''
cursor_
.
execute
(
sel_sql
,
(
item_id
,
year
))
cursor_
.
execute
(
sel_sql
,
(
item_id
,
year
))
selects
=
cursor_
.
fetchone
()
selects
=
cursor_
.
fetchone
()
if
selects
:
if
selects
:
...
@@ -322,7 +322,7 @@ if __name__ == '__main__':
...
@@ -322,7 +322,7 @@ if __name__ == '__main__':
dic_parms
=
getUrl
(
code
,
url_parms
,
Catagory2_parms
)
dic_parms
=
getUrl
(
code
,
url_parms
,
Catagory2_parms
)
SpiderByZJH
(
dic_parms
[
"url"
],
dic_parms
[
"payload"
],
dic_info
,
num
,
start_time
)
SpiderByZJH
(
dic_parms
[
"url"
],
dic_parms
[
"payload"
],
dic_info
,
num
,
start_time
)
end_time
=
time
.
time
()
end_time
=
time
.
time
()
print
(
f
'{dic_info[
"short_name"
]} ---- 该企业耗时 ---- {end_time - start_time}'
)
print
(
f
'{dic_info[
4
]} ---- 该企业耗时 ---- {end_time - start_time}'
)
count
+=
1
count
+=
1
runType
=
'AnnualReportCount'
runType
=
'AnnualReportCount'
baseCore
.
updateRun
(
social_code
,
runType
,
count
)
baseCore
.
updateRun
(
social_code
,
runType
,
count
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论