-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry won't pick a new proxy. #15
Comments
the problem may cause by this code I think when you retry, you already have a proxy in your request.meta, so the middleware just pass away. |
Same issue |
same +1 |
@aivarsk any chance you can update us on this? |
Same issue |
HGYD solution works for me. |
I have similar issue of selecting new proxy like mentioned above, with my code after finishing retry attempts the code executions stops. Please suggest some solution Here is the back trace 2017-07-06 18:54:45 [scrapy.extensions.telnet] DEBUG: Telnet console listening on 127.0.0.1:6042 |
Use errbacks in Requests:
|
What about setting a new proxy if a retry has happened? On line 81: # Don't overwrite with a random one (server-side state for IP)
# But when randomizing every request, we do want to update the proxy on retry.
if not (self.mode == Mode.RANDOMIZE_PROXY_EVERY_REQUESTS and request.meta.get('retry_times', 0) == 0):
if 'proxy' in request.meta:
if request.meta["exception"] is False:
return |
Hi,
I use a proxies list to run my spider. However, it failed to pick a new porxy when the connection failure happens.
Please help to fix this problem.
thanks a lot
The text was updated successfully, but these errors were encountered: