我有一个比方说 100 个 URL 的列表。我想在每 10 个 URL 之后更改 IP。
假设我有自己的代理,我想在每 10 个 URL 之后使用它们。我将如何在我的请求中使用该代理 - ?
list = [100URLS items]
proxies ['ip:port','ip:port']
for urls in list:
try:
##request 10 URLS here then it might throw me error.
except:
#After it throws me error, I want to be able to use proxies inside a list something like this and reiterate the same request with a new proxy using requests.