0
0
0x0000002F2022-01-23 13:16:39
Python
0x0000002F, 2022-01-23 13:16:39

How to send a request without specific headers?

I need to send a request with headers so that it looks exactly like this:
|| |
61ed292e60b42348489527.png

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:
|| |
61ed298414d5a851886547.png
<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);


How can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2022-01-23
@0x0000002F

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 question

Ask a Question

731 491 924 answers to any question