Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王景浩
zzsn_spider
Commits
310e8f15
提交
310e8f15
authored
12月 20, 2023
作者:
薛凌堃
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增上市企业信息、财务数据脚本维护
上级
9ceb2aaa
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
10 行增加
和
7 行删除
+10
-7
东方财富网财务数据.py
comData/caiwushuju/东方财富网财务数据.py
+7
-6
ipoInfo_newadd.py
comData/ipoInfo/ipoInfo_newadd.py
+3
-1
没有找到文件。
comData/caiwushuju/东方财富网财务数据.py
浏览文件 @
310e8f15
"""
"""
...
...
@@ -444,13 +444,13 @@ def getReportTime():
#todo:正式任务
# 获取当前日期和时间
current_date
=
datetime
.
now
()
current_date
_
=
datetime
.
now
()
# 计算昨天的日期
# yesterday = current_date - timedelta(days=1)
# 格式化昨天的日期
# report_date = yesterday.strftime('%Y-%m-%d')
# list_date.append(report_date)
year
=
int
(
current_date
.
strftime
(
'
%
Y'
))
year
=
int
(
current_date
_
.
strftime
(
'
%
Y'
))
# list_date = ['2023-09-30','2023-06-30','2023-03-31']
list_month
=
[
'-12-31'
,
'-09-30'
,
'-06-30'
,
'-03-31'
]
...
...
@@ -458,7 +458,7 @@ def getReportTime():
for
month
in
list_month
:
date
=
str
(
year
)
+
month
#todo:判断拼接的报告期是否大于当前日期,如果大于当前日期,怎说明还没到这个时间,跳过
current_date
=
current_date
.
strftime
(
'
%
Y-
%
m-
%
d'
)
current_date
=
current_date
_
.
strftime
(
'
%
Y-
%
m-
%
d'
)
if
current_date
<
date
:
continue
list_date
.
append
(
date
)
...
...
@@ -471,8 +471,8 @@ def job(taskType,cnx,cursor):
while
True
:
# 从redis中获取企业信用代码
social_code
=
baseCore
.
redicPullData
(
'FinanceFromEast:finance_socialCode'
)
# social_code = '91420300178856869P
'
#
social_code = baseCore.redicPullData('FinanceFromEast:finance_socialCode')
social_code
=
'9135020070548149XE
'
# 判断 如果Redis中已经没有数据,则等待
if
social_code
==
None
or
social_code
==
'None'
:
log
.
info
(
'======已没有数据==========等待====='
)
...
...
@@ -562,6 +562,7 @@ def job(taskType,cnx,cursor):
end_time
=
time
.
time
()
log
.
info
(
f
'===={com_code}====该企业耗时{end_time - start_time}==='
)
flag
=
1
break
cnx
.
close
()
cursor
.
close
()
baseCore
.
close
()
...
...
comData/ipoInfo/ipoInfo_newadd.py
浏览文件 @
310e8f15
...
...
@@ -19,7 +19,7 @@ list_all_info = []
# 需要提供股票代码、企业信用代码
while
True
:
# com_code1 = baseCore.redicPullData('Ipo_newsAdd:comCode')
com_code1
=
'
200725
'
com_code1
=
'
837748
'
if
com_code1
:
pass
else
:
...
...
@@ -98,6 +98,8 @@ while True:
jys_code
=
'2'
if
"深圳"
in
jys
:
jys_code
=
'3'
if
"北京"
in
jys
:
jys_code
=
'1'
except
:
jys
=
json_1
[
'jbzl'
][
0
][
'SECURITY_TYPE'
]
if
"北京"
in
jys
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论