ToB企服应用市场:ToB评测及商务社交产业平台
标题:
超简单获取主域名加备案号脚本(通过获取icp网站爬取)
[打印本页]
作者:
拉不拉稀肚拉稀
时间:
2022-8-9 14:38
标题:
超简单获取主域名加备案号脚本(通过获取icp网站爬取)
from urllib import request
import sys
from urllib import parse
import re
base_url = "https://www.beianx.cn/search/"
real_url = base_url + parse.quote(sys.argv[1])
print(real_url)
s = request.urlopen(request.Request(real_url)).read().decode('utf-8')
alist = re.findall('<td\s+>\s+\s+<a\starget="_blank" href=[^>]+>(.+)<\/a>',s)
blist = re.findall('<td\s+\s+nowrap="nowrap">\s+(.+)\r\s+<\/td>',s)
print("主域名数量:",len(alist))
for a in alist:
print(a)
for b in blist:
print(b)
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/)
Powered by Discuz! X3.4