D
D
Danila Rumyantsev2021-10-26 23:14:21
Parsing
Danila Rumyantsev, 2021-10-26 23:14:21

Is it possible to send requests from several ip addresses from one device?

I am writing a site parser, there was such a problem that if there are too many requests, ip is blocked, so please advise if it is possible to send requests from several ip from one device, I use bs4 and requests for parsing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScriptKiddo, 2021-10-26
@ScriptKiddo

Yes, you can. Use proxy
https://2.python-requests.org/en/master/user/advan...

import requests

proxies = {
  'http': 'http://10.10.1.10:3128',
  'https': 'http://10.10.1.10:1080',
}

requests.get('http://example.org', proxies=proxies)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question