爬虫时用json把str转化为dict格式
源码:
import requests
import json
url="https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5&callback=jQuery35100972824561955914_1638255662790&_=1638255662791"
header={
"user-agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
}
req = requests.get(url