我试图使用或更改IP地址,并对所有可访问的公共数据进行web抓取,但我无法找到解决方案。我正在尝试做一个旋转的ip地址。我在Windows 10和Anaconda IDE上。例如,我在下面执行以下代码:
import requests
domain = "https://www.undernews.fr"
#define your proxies
#the socks5h method allows the socks server to translate the #hostname. So make sure that you add 'socks5h'.