D
D
Danila Rumyantsev2021-11-01 12:47:46
Python
Danila Rumyantsev, 2021-11-01 12:47:46

When parsing a site, ip is blocked due to a large number of requests, how to avoid this?

I wrote a parser for the Avito site, it works based on the bs4 and requests libraries, IP is blocked if requests are too frequent, I tried to make requests through a proxy, it didn’t help, only sleep(random.randint()) helps a little, but sometimes it still blocks, yes and in addition, 100 pages are parsed because of this for quite a long time

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rrambo, 2021-11-02
@Bubunduc

Yes, there is no way to avoid it. Either a proxy, or increase the pause between requests .. you can wait. Throw it on the server and let it work for itself

S
Saboteur, 2021-11-01
@saboteur_kiev

Well, that's right. There is nothing to parse sites. If there are 10 people like you? And if 100? And if 1000? Do you want to buy dozens of new servers for your sake? It's easier to just block the parsers and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question