1

I wrote a program in Python that browses different pages of a website every hour (using webbrowser and schedule). Now I want this program to use different IP addresses every time when visiting this website. Please help.

Saman Bina
  • 11
  • 1
  • You can easily fake the source address in the HTTP headers, but to spoof the low-level IP headers is a very different thing. Please tell us at what level you want to spoof the source address? Why do you want to do that? And if you spoof the low-level IP headers, how do you expect to get the reply back to your system and not to the system whose adress you're using? – Some programmer dude Aug 26 '20 at 21:49
  • There is no proxy/vpn option in the webbrowser module in python, however you can use selenium which has support for proxies. Heres a link to a similar question which has an answer – FloridaGuy Aug 26 '20 at 23:15

1 Answers1

0

Changing to a different IP address will require the use of a proxy.

It's not something that is done by just coding. Instead, you need to find free or paid proxy servers and use them, modifying your proxy settings per request.

For more info doing it using the highly popular requests module, see the following answer.

Bharel
  • 23,672
  • 5
  • 40
  • 80