Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王景浩
zzsn_spider
Commits
6051a235
提交
6051a235
authored
9月 11, 2023
作者:
薛凌堃
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
东方财富网财务数据维护
上级
8a9ce091
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
21 行增加
和
11 行删除
+21
-11
东方财富网财务数据.py
comData/caiwushuju/东方财富网财务数据.py
+21
-11
没有找到文件。
comData/caiwushuju/东方财富网财务数据.py
浏览文件 @
6051a235
"""
"""
...
@@ -458,11 +458,15 @@ def getReportTime():
...
@@ -458,11 +458,15 @@ def getReportTime():
def
job
(
taskType
):
def
job
(
taskType
):
# 将上市企业库中的全部A股代码存入list
# 将上市企业库中的全部A股代码存入list
# 需要提供股票代码、企业信用代码
# 需要提供股票代码、企业信用代码
def
job
(
taskType
):
# 将上市企业库中的全部A股代码存入list
# 需要提供股票代码、企业信用代码
while
True
:
while
True
:
#
从redis中获取企业信用代码
#
从redis中获取企业信用代码
social_code
=
baseCore
.
redicPullData
(
'FinanceFromEast:east
finance_socialCode'
)
social_code
=
baseCore
.
redicPullData
(
'FinanceFromEast:
finance_socialCode'
)
# social_code = '91100000100003962T
'
# social_code = '91420300178856869P
'
# 判断 如果Redis中已经没有数据,则等待
# 判断 如果Redis中已经没有数据,则等待
log
.
info
(
f
'==========正在采集{social_code}============'
)
if
social_code
==
None
:
if
social_code
==
None
:
time
.
sleep
(
20
)
time
.
sleep
(
20
)
continue
continue
...
@@ -500,10 +504,13 @@ def job(taskType):
...
@@ -500,10 +504,13 @@ def job(taskType):
for
info_date
in
list_date
:
for
info_date
in
list_date
:
delist_all
=
[]
delist_all
=
[]
info_date_list
=
[]
info_date_list
=
[]
dic_info
=
get_info
(
social_code
,
com_code
,
info_date
,
delist_all
,
info_date_list
,
taskType
)
dic_info
=
get_info
(
social_code
,
com_code
,
info_date
,
delist_all
,
info_date_list
,
taskType
)
# print(dic_info)
# print(dic_info)
# 将采集后的报告期存入redis
# 将采集后的报告期存入redis
if
len
(
dic_info
)
!=
0
:
if
len
(
info_date_list
)
!=
0
:
for
date
in
info_date_list
:
date_list
.
append
(
date
)
if
len
(
dic_info
)
!=
0
:
# 调凯歌接口存储数据
# 调凯歌接口存储数据
data
=
json
.
dumps
(
dic_info
)
data
=
json
.
dumps
(
dic_info
)
# print(data)
# print(data)
...
@@ -522,13 +529,16 @@ def job(taskType):
...
@@ -522,13 +529,16 @@ def job(taskType):
break
break
except
:
except
:
time
.
sleep
(
1
)
time
.
sleep
(
1
)
if
len
(
info_date_list
)
!=
0
:
#
if len(info_date_list) != 0:
for
date
in
info_date_list
:
#
for date in info_date_list:
date_list
.
append
(
date
)
#
date_list.append(date)
print
(
date_list
)
log
.
info
(
date_list
)
# date_list = str(date_list)
# date_list = str(date_list)
end_time
=
time
.
time
()
end_time
=
time
.
time
()
log
.
info
(
f
'===={com_code}====该企业耗时{end_time-start_time}==='
)
log
.
info
(
f
'===={com_code}====该企业耗时{end_time - start_time}==='
)
cnx
.
close
()
cursor
.
close
()
baseCore
.
close
()
cnx
.
close
()
cnx
.
close
()
cursor
.
close
()
cursor
.
close
()
baseCore
.
close
()
baseCore
.
close
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论