Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王景浩
zzsn_spider
Commits
0b43aa91
提交
0b43aa91
authored
10月 30, 2023
作者:
薛凌堃
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新企业基本信息采集
上级
caa8a15c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
6 行增加
和
5 行删除
+6
-5
base_info.py
comData/BaseInfo_qcc/base_info.py
+6
-5
没有找到文件。
comData/BaseInfo_qcc/base_info.py
浏览文件 @
0b43aa91
...
...
@@ -9,7 +9,8 @@ import json
from
kafka
import
KafkaProducer
from
base.BaseCore
import
BaseCore
from
getQccId
import
find_id_by_name
import
urllib3
urllib3
.
disable_warnings
(
urllib3
.
exceptions
.
InsecureRequestWarning
)
baseCore
=
BaseCore
()
cnx_
=
baseCore
.
cnx
cursor_
=
baseCore
.
cursor
...
...
@@ -336,8 +337,8 @@ if __name__ == '__main__':
continue
start_time
=
time
.
time
()
# 获取企业信息
social_code
=
baseCore
.
redicPullData
(
'BaseInfoEnterprise:gnqy_socialCode'
)
# social_code = '91330000734530895W
'
#
social_code = baseCore.redicPullData('BaseInfoEnterprise:gnqy_socialCode')
social_code
=
'91130800757548430L
'
if
social_code
==
''
or
social_code
is
None
:
time
.
sleep
(
20
)
continue
...
...
@@ -361,7 +362,7 @@ if __name__ == '__main__':
if
company_id
==
'null'
:
log
.
info
(
'=====搜索不到该企业===='
)
#todo:搜不到的企业没有信用代码 传输不过去 生成一个信用代码
baseCore
.
rePutIntoR
(
'
global100:baseinfo
'
,
social_code
+
':搜索不到'
)
baseCore
.
rePutIntoR
(
'
BaseInfoEnterprise:gnqy_socialCode
'
,
social_code
+
':搜索不到'
)
continue
if
not
company_id
:
log
.
info
(
com_name
+
":企业ID获取失败===重新放入redis"
)
...
...
@@ -406,7 +407,7 @@ if __name__ == '__main__':
}
name_list
.
append
(
name_compile
)
nowtime
=
baseCore
.
getNowTime
(
1
)
.
replace
(
'-'
,
'_'
)[:
10
]
baseCore
.
writerToExcel
(
name_list
,
f
'企业名称对比
_{nowtime}
.xlsx'
)
baseCore
.
writerToExcel
(
name_list
,
f
'企业名称对比.xlsx'
)
log
.
info
(
f
'采集{com_name}成功=======耗时{baseCore.getTimeCost(start_time,time.time())}'
)
try
:
producer
=
KafkaProducer
(
bootstrap_servers
=
[
'114.115.159.144:9092'
],
api_version
=
(
2
,
0
,
2
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论