爬取动态网页之json篇,,困难重重,网页都下载不下来
2021-03-12 16:28
标签:import ima print json对象 alt mozilla ext err port 爬取动态网页之json篇,,困难重重,网页都下载不下来 标签:import ima print json对象 alt mozilla ext err port 原文地址:https://www.cnblogs.com/cy-lzp-20171218/p/12826462.htmlimport requests, json
headers = {
‘User-Agent‘: ‘Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36‘,
‘Referer‘: ‘meta name="referrer" content="never"‘}
response = requests.get(url="https://list.vip.com/100655972.html?ff=6|11|2|selling|4", headers=headers) #传回的是json对象
print(type(response))
# response.decode()
result = json.loads(response.text)
运行结果:
上一篇:laravel 浏览器谷歌network返回报错html
下一篇:前端常用网站大全
文章标题:爬取动态网页之json篇,,困难重重,网页都下载不下来
文章链接:http://soscw.com/index.php/essay/63751.html