|
9鱼币
import requests
header={
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Encoding':'gzip, deflate',
'Accept-Language':'zh-CN,zh;q=0.9',
'Cache-Control':'max-age=0',
'Connection':'keep-alive',
'Host':'i.ipyingshe.com',
'If-Modified-Since:Mon, 16 May 2022 11:12':'08 GMT',
'If-None-Match':'"62823188-13bd"',
'Upgrade-Insecure-Requests':'1',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'}
re=requests.get(url="http://i.ipyingshe.com/#/user/login?redirect=%2Fdashboard%2Findex",headers=header)
print(re.text)
报错内容是: raise ValueError('Invalid header name %r' % (header,))
找了好几遍没有多余的冒号 麻烦大佬看一下这个是什么原因
'If-Modified-Since:Mon, 16 May 2022 11:12':'08 GMT',
改:
'If-Modified-Since': 'Mon, 16 May 2022 11:12:08 GMT'
|
最佳答案
查看完整内容
'If-Modified-Since:Mon, 16 May 2022 11:12':'08 GMT',
改:
'If-Modified-Since': 'Mon, 16 May 2022 11:12:08 GMT'
|