Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王景浩
zzsn_spider
Commits
af03b018
提交
af03b018
authored
9月 26, 2023
作者:
薛凌堃
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据库事务提交
上级
b2ebfb55
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
1 行删除
+14
-1
BaseCore.py
base/BaseCore.py
+1
-0
RedisPPData.py
base/RedisPPData.py
+11
-1
BaseCore.py
comData/caiwushuju/BaseCore.py
+2
-0
没有找到文件。
base/BaseCore.py
浏览文件 @
af03b018
...
...
@@ -482,6 +482,7 @@ class BaseCore:
cursor
=
conn
.
cursor
()
cursor
.
execute
(
sql
)
data
=
cursor
.
fetchone
()
conn
.
commit
()
data
=
list
(
data
)
cursor
.
close
()
conn
.
close
()
...
...
base/RedisPPData.py
浏览文件 @
af03b018
...
...
@@ -62,7 +62,7 @@ def NewsEnterprise():
gw_query
=
"select SocialCode from EnterpriseInfo where Place = '2'"
cursor
.
execute
(
gw_query
)
gw_result
=
cursor
.
fetchall
()
cnx
.
commit
()
gw_social_list
=
[
item
[
0
]
for
item
in
gw_result
]
#todo:打印长度
# print(len(gw_social_list))
...
...
@@ -96,6 +96,7 @@ def NoticeEnterprise():
# 获取国内企业
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null "
cursor
.
execute
(
gn_query
)
cnx
.
commit
()
gn_result
=
cursor
.
fetchall
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
...
...
@@ -123,6 +124,7 @@ def BaseInfoEnterprise():
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1'"
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
cnx
.
commit
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
for
item
in
gn_social_list
:
...
...
@@ -149,6 +151,7 @@ def CorPerson():
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1'"
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
cnx
.
commit
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
for
item
in
gn_social_list
:
...
...
@@ -174,6 +177,7 @@ def FinanceFromEast():
sql_sel
=
'''select social_credit_code from sys_base_enterprise_ipo where category = '1' '''
cursor_
.
execute
(
sql_sel
)
finance
=
cursor_
.
fetchall
()
cnx_
.
commit
()
finance_list
=
[
item
[
0
]
for
item
in
finance
]
print
(
'======='
)
for
item
in
finance_list
:
...
...
@@ -198,6 +202,7 @@ def WeiXingetFromSql():
selectSql
=
"SELECT info_source_code from info_source where site_uri like '
%
mp.weixin.qq.com
%
'"
cursor_
.
execute
(
selectSql
)
results
=
cursor_
.
fetchall
()
cnx_
.
commit
()
result_list
=
[
item
[
0
]
for
item
in
results
]
#放入redis
for
item
in
result_list
:
...
...
@@ -225,6 +230,7 @@ def AnnualEnterprise():
gn_query
=
"select SocialCode from EnterpriseInfo where Place = '1' and SecuritiesCode is not null"
cursor
.
execute
(
gn_query
)
gn_result
=
cursor
.
fetchall
()
cnx
.
commit
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
for
item
in
gn_social_list
:
...
...
@@ -252,6 +258,7 @@ def AnnualEnterpriseXueQ():
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
()
cnx
.
commit
()
gn_social_list
=
[
item
[
0
]
for
item
in
gn_result
]
print
(
'======='
)
for
item
in
gn_social_list
:
...
...
@@ -280,6 +287,7 @@ def AnnualEnterpriseUS():
#ZZSN22080900000025
cursor
.
execute
(
us_query
)
us_result
=
cursor
.
fetchall
()
cnx
.
commit
()
us_social_list
=
[
item
[
0
]
for
item
in
us_result
]
print
(
'======='
)
for
item
in
us_social_list
:
...
...
@@ -318,6 +326,7 @@ def SEC_CIK():
cik_query
=
"select cik from mgzqyjwyh_list where state=2"
cursor
.
execute
(
cik_query
)
cik_result
=
cursor
.
fetchall
()
cnx
.
commit
()
cik_list
=
[
item
[
0
]
for
item
in
cik_result
]
print
(
'====='
)
for
item
in
cik_list
:
...
...
@@ -408,6 +417,7 @@ def NQEnterprise():
nq_query
=
"SELECT social_credit_code FROM sys_base_enterprise_ipo WHERE securities_type='新三板' and listed='1'"
cursor_
.
execute
(
nq_query
)
nq_result
=
cursor_
.
fetchall
()
cnx_
.
commit
()
nq_social_list
=
[
item
[
0
]
for
item
in
nq_result
]
for
item
in
nq_social_list
:
...
...
comData/caiwushuju/BaseCore.py
浏览文件 @
af03b018
...
...
@@ -436,6 +436,7 @@ class BaseCore:
sql
=
f
"SELECT * FROM EnterpriseInfo WHERE SocialCode = '{social_code}'"
self
.
cursor
.
execute
(
sql
)
data
=
self
.
cursor
.
fetchone
()
self
.
cnx
.
commit
()
return
data
# 更新企业采集次数
...
...
@@ -464,6 +465,7 @@ class BaseCore:
# token = '67ec7402166df1da84ae83c4b95cefc0' # 需要隔两个小时左右抓包修改
self
.
cursor
.
execute
(
query
)
token
=
self
.
cursor
.
fetchone
()[
0
]
self
.
cnx
.
commit
()
return
token
#检测语言
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论