Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zzsn_spider
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁双波
zzsn_spider
Commits
1a93992c
提交
1a93992c
authored
9月 12, 2023
作者:
薛凌堃
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新三板企业企查查id获取
上级
ea2b7efb
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
67 行增加
和
1 行删除
+67
-1
NQgetid.py
comData/dfcfwGpdm/NQenterprise/NQgetid.py
+0
-0
getQccId.py
comData/dfcfwGpdm/NQenterprise/getQccId.py
+65
-0
wxList.py
comData/weixin_solo/wxList.py
+2
-1
没有找到文件。
comData/dfcfwGpdm/NQenterprise/NQgetid.py
0 → 100644
浏览文件 @
1a93992c
差异被折叠。
点击展开。
comData/dfcfwGpdm/NQenterprise/getQccId.py
0 → 100644
浏览文件 @
1a93992c
# -*- coding: utf-8 -*-
import
time
from
urllib.parse
import
quote
import
requests
import
urllib3
from
base.BaseCore
import
BaseCore
baseCore
=
BaseCore
()
log
=
baseCore
.
getLogger
()
headers
=
{
'Host'
:
'xcx.qcc.com'
,
'Connection'
:
'keep-alive'
,
'Qcc-Platform'
:
'mp-weixin'
,
'Qcc-Timestamp'
:
''
,
'Qcc-Version'
:
'1.0.0'
,
'User-Agent'
:
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat'
,
'content-type'
:
'application/json'
,
'Referer'
:
'https://servicewechat.com/wx395200814fcd7599/166/page-frame.html'
,
'Accept-Encoding'
:
'gzip, deflate, br,'
}
# 通过企业名称或信用代码获取企查查id
def
find_id_by_name
(
start
,
token
,
name
):
urllib3
.
disable_warnings
()
qcc_key
=
name
t
=
str
(
int
(
time
.
time
())
*
1000
)
headers
[
'Qcc-Timestamp'
]
=
t
url
=
f
"https://xcx.qcc.com/mp-weixin/forwardApp/v3/base/advancedSearch?token={token}&t={t}&pageIndex=1&needGroup=yes&insuredCntStart=&insuredCntEnd=&startDateBegin=&startDateEnd=®istCapiBegin=®istCapiEnd=&countyCode=&province=&sortField=&isSortAsc=&searchKey={quote(qcc_key)}&searchIndex=default&industryV3="
for
lll
in
range
(
1
,
6
):
try
:
resp_dict
=
requests
.
get
(
url
=
url
,
headers
=
headers
,
verify
=
False
)
.
json
()
break
except
:
print
(
'重试'
)
time
.
sleep
(
5
)
continue
time
.
sleep
(
2
)
#{'status': 40101, 'message': '无效的sessionToken!'} {'status': 401, 'message': '您的账号访问超频,请升级小程序版本'}
if
resp_dict
[
'status'
]
==
40101
:
KeyNo
=
False
log
.
info
(
f
'====token失效====时间{baseCore.getTimeCost(start, time.time())}'
)
return
KeyNo
if
resp_dict
[
'status'
]
==
401
:
KeyNo
=
False
log
.
info
(
f
'=======您的账号访问超频,请升级小程序版本=====时间{baseCore.getTimeCost(start, time.time())}'
)
return
KeyNo
try
:
if
resp_dict
[
'result'
][
'Result'
]:
result_dict
=
resp_dict
[
'result'
][
'Result'
][
0
]
KeyNo
=
result_dict
[
'KeyNo'
]
Name
=
result_dict
[
'Name'
]
.
replace
(
'<em>'
,
''
)
.
replace
(
'</em>'
,
''
)
.
strip
()
if
Name
==
''
:
KeyNo
=
''
else
:
KeyNo
=
''
except
:
KeyNo
=
False
log
.
info
(
f
'====token失效====时间{baseCore.getTimeCost(start,time.time())}'
)
return
KeyNo
print
(
"{},企业代码为:{}"
.
format
(
qcc_key
,
KeyNo
))
return
KeyNo
\ No newline at end of file
comData/weixin_solo/wxList.py
浏览文件 @
1a93992c
...
@@ -262,7 +262,8 @@ if __name__=="__main__":
...
@@ -262,7 +262,8 @@ if __name__=="__main__":
log
.
info
(
"redis已经没有数据了,重新放置数据"
)
log
.
info
(
"redis已经没有数据了,重新放置数据"
)
getFromSql
()
getFromSql
()
time
.
sleep
(
60
)
time
.
sleep
(
60
)
infoSourceCode
=
baseCore
.
redicPullData
(
'WeiXinGZH:infoSourceCode'
)
continue
# infoSourceCode = baseCore.redicPullData('WeiXinGZH:infoSourceCode')
getWxList
(
infoSourceCode
)
getWxList
(
infoSourceCode
)
# infoSourceCode = 'IN-20220917-0159'
# infoSourceCode = 'IN-20220917-0159'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论