Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王景浩
zzsn_spider
Commits
db2408bf
提交
db2408bf
authored
8月 18, 2023
作者:
LiuLiYuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
雅虎企业动态
上级
1087d9ec
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
31 行增加
和
2 行删除
+31
-2
RedisPPData.py
base/RedisPPData.py
+31
-2
没有找到文件。
base/RedisPPData.py
浏览文件 @
db2408bf
...
@@ -72,7 +72,7 @@ def NewsEnterprise_task():
...
@@ -72,7 +72,7 @@ def NewsEnterprise_task():
#企业公告
#企业公告
def
NoticeEnterprise
():
def
NoticeEnterprise
():
# 获取国内企业
# 获取国内企业
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null limit 1 "
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null limit 1
0
"
cursor
.
execute
(
gn_query
)
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
gn_result
=
cursor
.
fetchall
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
...
@@ -95,13 +95,14 @@ def NoticeEnterprise_task():
...
@@ -95,13 +95,14 @@ def NoticeEnterprise_task():
#企业年报
#企业年报
def
AnnualEnterprise
():
def
AnnualEnterprise
():
# 获取国内企业
# 获取国内企业
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null"
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null
limit 10
"
cursor
.
execute
(
gn_query
)
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
gn_result
=
cursor
.
fetchall
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
print
(
'======='
)
for
item
in
gn_social_list
:
for
item
in
gn_social_list
:
r
.
rpush
(
'AnnualEnterprise:gnqy_socialCode'
,
item
)
r
.
rpush
(
'AnnualEnterprise:gnqy_socialCode'
,
item
)
#企业年报定时任务
#企业年报定时任务
def
AnnualEnterprise_task
():
def
AnnualEnterprise_task
():
# 实例化一个调度器
# 实例化一个调度器
...
@@ -162,6 +163,27 @@ def weixin_task():
...
@@ -162,6 +163,27 @@ def weixin_task():
print
(
'定时采集异常'
,
e
)
print
(
'定时采集异常'
,
e
)
pass
pass
# 企业年报——雪球网
def
AnnualEnterpriseIPO
():
# 获取国内上市企业
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null and isIPO = 1 limit 10"
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
for
item
in
gn_social_list
:
r
.
rpush
(
'AnnualEnterprise:gnshqy_socialCode'
,
item
)
#国外企业基本信息
def
BaseInfoEnterpriseAbroad
():
# 获取国外企业
gn_query
=
"select id from EnterpriseInfo where Place = '2' limit 10 "
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
for
item
in
gn_social_list
:
r
.
rpush
(
'BaseInfoEnterprise:gwqy_socialCode'
,
item
)
##福布斯=====从数据库中读取信息放入redis
##福布斯=====从数据库中读取信息放入redis
def
FBS
():
def
FBS
():
# todo:调整为获取福布斯的数据库
# todo:调整为获取福布斯的数据库
...
@@ -185,8 +207,15 @@ def FBS():
...
@@ -185,8 +207,15 @@ def FBS():
r
.
rpush
(
'NewsEnterpriseFbs:gnqy_socialCode'
,
item
)
r
.
rpush
(
'NewsEnterpriseFbs:gnqy_socialCode'
,
item
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
start
=
time
.
time
()
start
=
time
.
time
()
# NoticeEnterprise()
# AnnualEnterpriseIPO()
# AnnualEnterprise()
# BaseInfoEnterpriseAbroad()
# NewsEnterprise_task()
# NewsEnterprise_task()
# NewsEnterprise()
# NewsEnterprise()
# BaseInfoEnterprise()
# BaseInfoEnterprise()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论