# 单个采集
# 'https://flk.npc.gov.cn/detail2.html?ZmY4MDgxODE4ZDZhNDYzOTAxOTA1ZjJjYzJjMTJkM2I%3D'(单个爬取)
import requests
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0'
}
url = 'https://flk.npc.gov.cn/api/detail'
data = {
'id': 'ZmY4MDgxODE4YzNjZTBlZDAxOGNiNzA3ZDExMTJmNzE%3D'
}
response = requests.post(url=url, data=data, headers=headers)
# text = response.text
# print(text)
# print(type(text))
json_data = response.json()
# print(json_data)
# print(type(json_data))
title = json_data['result']['title']
download = 'https://wb.flk.npc.gov.cn
某网页律文获取
最新推荐文章于 2025-06-12 22:38:01 发布