Answer the question
In order to leave comments, you need to log in
How to send a request without specific headers?
I need to send a request with headers so that it looks exactly like this:
|| |
But when I try to send, I get unnecessary headers. No matter how strange it may sound, but the server issues a 403 error if they are present:
|| |
<Response [403]>
The server must return either -1 or two positive numbers .
Sending in python, via requests:
|| |
import requests
url = '...';
data = {
# ...
}
x = requests.post(url, data=data);
print(x);
Answer the question
In order to leave comments, you need to log in
Specify your headers (in particular, you can change the User-Agent) by passing them to requests as a dictionary.
An example from the Custom Headers documentation .
Surely the target site you are trying to access has filtering by User-Agent.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question