Python requests, change IP address

后端 未结 2 828
离开以前
离开以前 2020-12-30 16:56

I am coding a web scraper for the website with the following Python code:

import requests

def scrape(url):
    req = requests.get(url)
    with open(\'out.h         


        
2条回答
  •  情深已故
    2020-12-30 17:42

    As already mentioned in the comments and from yourself, changing the IP could help. To do this quite easily have a look at vpngate.py:

    https://gist.github.com/Lazza/bbc15561b65c16db8ca8

    An How to is provided at the link.

    Have fun

提交回复
热议问题