标签:import ima print json对象 alt mozilla ext err port
import 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)
运行结果:
标签:import ima print json对象 alt mozilla ext err port
原文地址:https://www.cnblogs.com/cy-lzp-20171218/p/12826462.html