How do I change the referer if I'm using the requests library to make a GET request to a web page. I went through the entire manual but couldn't find it.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
According to http://docs.python-requests.org/en/latest/user/advanced/#session-objects , you should be able to do:
Or just:
Your
headers
dict will be merged with the default/session headers. From the docs: