We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
h = ''' Connection: keep-alive Pragma: no-cache Cache-Control: no-cache Accept: application/json, text/plain, / Sec-Fetch-Dest: document User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36 Sec-Fetch-Site: same-site Sec-Fetch-Mode: cors Referer: https://www.keledge.com Accept-Encoding: gzip, deflate, br Accept-Language: en,zh-CN;q=0.9,zh;q=0.8,pt;q=0.7
'''
headers = dict([i.split(': ', 1) for i in h.split('\n') if i != '']) headers = {}
为什么headers = {}?
The text was updated successfully, but these errors were encountered:
屏蔽了上面的headers,用requests默认的即可
Sorry, something went wrong.
也就是不用headers r = requests.get(url)的意思喽
No branches or pull requests
h = '''
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json, text/plain, /
Sec-Fetch-Dest: document
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Referer: https://www.keledge.com
Accept-Encoding: gzip, deflate, br
Accept-Language: en,zh-CN;q=0.9,zh;q=0.8,pt;q=0.7
'''
headers = dict([i.split(': ', 1) for i in h.split('\n') if i != ''])
headers = {}
为什么headers = {}?
The text was updated successfully, but these errors were encountered: