-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Avoid webDriver->quit()
on __destruct()
when scraping *remote* websites
#466
Comments
I run 30 instances of Panther in parallel using different ports and each of them connects to different proxy. I often get that error and I'm not sure why |
@ThomasLandauer what client for scraping do you use? Curl ? Chrome? Firefox? |
Firefox. |
It's maybe related to the bug I try to fix in #425. However I didn't manage to get this patch working and I'm not sure of when I'll have the time yo work on it again. Help welcome on this one (yes, destructors are hard to deal with). |
I think I'm experiencing the same issue (i.e. I get the delete error when using Panther on remote sites) Is there any fix suggested? Or where should I look to try and patch it myself? Maybe we could add some setting on Client to tell it not to call |
Hi @gravitiq-cm, as explained previously, this error is most likely caused by the bug I tried to fix in #425 Unfortunately, I didn't find the time to finish it and it's at the very end of my todo list. Help on fixing this would be much appreciated! |
I think a valid solution would be to allow users to define a different class to use instead of the hard-coded For example, change from:
to:
Users could then create a custom class which extends RemoteWebDriver and has their own customisation. RemoteWebDriver looks extensible... it has no private methods or functions, so would be easy to extend then (in this case) override |
IMHO it would be better to fix the bug for everybody without asking the user to write custom code. |
When connecting to remote webpages, I'm sometimes getting this exception:
And at the bottom of Symfony's exception page:
As far as I can see, the cause is:
When done, Panther tries to cleanup and
Client::quit()
calls$this->webDriver->quit();
.And from this I'm guessing:
5xx
. Possible side effect: After doing this "forbidden" request repeatedly, I might get blocked.So the solution looks pretty clear to me: Don't send that request remotely ;-)
So the first question towards a PR would be: Do you want an automatic check, or rather some user-configurable option to suppress this cleanup?
Related: #169 (don't know if it's really the same, or some Docker-related problem)
The text was updated successfully, but these errors were encountered: