S
S
swpavlov2020-11-06 15:43:17
Python
swpavlov, 2020-11-06 15:43:17

403 request error?

At some point in development, the server began to give a 403 error. I changed headers, tried to connect a proxy - all to no avail. Code below. Tried different variations and fullness of headers!

url = 'https://avito.ru/'
headers = {'user-agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0', 'accept': '*/*'}
proxyDict = {
    'https': 'https://47.253.10.161:8080'
}

    def req(self, url):
        r = requests.get(url, headers=headers, proxies=proxyDict)
        return r

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Antonio Solo, 2020-11-06
@solotony

the server calculated one hundred you are parsing it and started to fight with you.
what do you want from the question? especially if

I changed headers, tried to connect a proxy - all to no avail. Code below. Tried different variations and fullness of headers!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question