Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁双波
zzsn_spider
Commits
7c3290ba
提交
7c3290ba
authored
8月 17, 2024
作者:
XveLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
天眼查-主要人员
上级
7a86fc5f
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
7 行删除
+11
-7
CorePerson.py
comData/Tyc/CorePerson.py
+11
-7
没有找到文件。
comData/Tyc/CorePerson.py
浏览文件 @
7c3290ba
...
...
@@ -42,8 +42,10 @@ def get_html(tycid, driver, headers):
div_part
=
soup
.
find
(
'div'
,
attrs
=
{
'data-dim'
:
'staff'
})
# div_part.find('div', class_='dimHeader_root__XTCLe')
except
:
log
.
info
(
'没找到staff模块'
)
return
-
1
if
div_part
is
None
:
log
.
info
(
'staff模块为空'
)
return
-
2
else
:
try
:
...
...
@@ -139,9 +141,9 @@ def doJob():
else
:
continue
# 根据从Redis中拿到的社会信用代码,在数据库中获取对应基本信息
item
=
baseCore
.
redicPullData
(
'CorPersonEnterprise:gnqy_socialCode'
)
#
item = baseCore.redicPullData('CorPersonEnterprise:gnqy_socialCode')
# 判断 如果Redis中已经没有数据,则等待
# social_code = '91110108780992804C
'
item
=
'9133000070471161XA
'
if
item
==
None
:
time
.
sleep
(
30
*
60
)
continue
...
...
@@ -219,9 +221,9 @@ def doJob():
elif
charge
==
-
2
:
# 该企业没有人员信息
token
.
updateTokeen
(
id_cookie
,
2
)
baseCore
.
rePutIntoR
(
'CorPersonEnterprise:gnqy_socialCode'
,
item
)
log
.
info
(
f
"{id}---{xydm}----{tycid}----没有核心人员
或需要滑动验证----重新放入redis
"
)
token
.
updateTokeen
(
id_cookie
,
3
)
#
baseCore.rePutIntoR('CorPersonEnterprise:gnqy_socialCode', item)
log
.
info
(
f
"{id}---{xydm}----{tycid}----没有核心人员"
)
time
.
sleep
(
5
)
# log.info(f"{id}---{xydm}----{tycid}----没有核心人员")
continue
...
...
@@ -497,7 +499,9 @@ def doJob():
continue
else
:
pass
response
=
requests
.
post
(
'http://114.115.236.206:8088/sync/executive'
,
data
=
json_updata
,
timeout
=
300
,
# response = requests.post('http://114.115.236.206:8088/sync/executive', data=json_updata, timeout=300,
# verify=False)
response
=
requests
.
post
(
'http://114.115.218.248:9292/userserver/sync/executive'
,
data
=
json_updata
,
timeout
=
300
,
verify
=
False
)
print
(
response
.
text
)
log
.
info
(
'=========成功======'
)
...
...
@@ -511,7 +515,7 @@ def doJob():
log
.
info
(
f
'==={social_code}=====企业核心人员采集失败===重新放入redis===='
)
log
.
info
(
e
)
# 重新塞入redis
baseCore
.
rePutIntoR
(
'CorPersonEnterprise:gnqy_socialCode'
,
item
)
#
baseCore.rePutIntoR('CorPersonEnterprise:gnqy_socialCode', item)
state
=
0
takeTime
=
baseCore
.
getTimeCost
(
start
,
time
.
time
())
baseCore
.
recordLog
(
social_code
,
taskType
,
state
,
takeTime
,
''
,
f
'获取企业信息失败--{e}'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论