import requests from lxml import etree import time import pymysql import json headers={ 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36', 'Content-Type':'application/x-www-form-urlencoded', 'Pragma':'no-cache', 'Upgrade-Insecure-Requests':'1', 'Content-Length':'86', 'Host':'www.bjda.gov.cn' } headers_xiangqing={ 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36', 'Pragma':'no-cache', 'Upgrade-Insecure-Requests':'1', 'Host':'www.bjda.gov.cn' } dd={ 'pageSize':'20' } temp=[] dd['currentPage'] = '10' print(dd) response = requests.post('http://www.bjda.gov.cn/eportal/ui?pageId=348736', headers=headers, data=dd) selector = etree.HTML(response.text) item_spider = list(set(selector.xpath('//tr[@class="chaxun_con"]//a/@href'))) temp.extend(item_spider) for i in temp: print('http://www.bjda.gov.cn/eportal/ui?pageId=348738&'+i[1:]) response=requests.get('http://www.bjda.gov.cn/eportal/ui?pageId=348738&'+i[1:],headers=headers_xiangqing) print(response.status_code) selector=etree.HTML(response.text) tr=selector.xpath('//table[@class="table_sjcx"]//tr') print(tr
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
2016-04-18 SQL service 自动解决依赖包 验证
2016-04-18 SQL service
2016-04-18 createrepo
2016-04-18 mkisofs
2016-04-18 yum -y --downloadonly --downloaddir=/ruiy upggrde;
2016-04-18 yum -y --downloadonly --downloaddir=/root/ruiy update
2016-04-18 createrepo -g /enp/comps.xml .