-
Notifications
You must be signed in to change notification settings - Fork 921
Access iframe in closed shadow root + click on checkbox from iframe body #1272
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
base: master
Are you sure you want to change the base?
Conversation
|
@MCG-pok So it doesn't work now? |
|
I can confirm this fixed #1253 for me |
|
Yes it works. I think a better way would be to find how to open the last shadow-root. Maybe I will try to do this later. |
|
@MCG-pok ok great so how to proceed then. Which file do I need to modify? Is there a way to put the fix and make something ready to use? |
|
People with the right to do it can merge this pull request |
|
Hi It works for me :) Thank you for the pull request <3 |
|
Thank you @MCG-pok ! It work's perfectly ! |
|
Not working in docker env on Unraid with latest tag and flaresolverr_service.py modified mounted. |
can you provide some logs please ? |
|
Here are logs (debug info) : |
|
I confirm : works for me ;) |
|
thank you @HpNoTiQ56 The debug log next to I think you are not running the patched flaresolverr_service.py, maybe it is not well mounted or you got the wrong file ? |
|
can someone put the docker version on a repo please? or tell me how to modify? thanks |
|
@MCG-pok can you integrate the fix to flaresolverr and put it in a repo ? |
|
Indeed, wrong file but still error with modified path :
|
Sorry, on previous messages I though you were asking the next step to integrate the fix in Flaresolverr |
|
|
@MCG-pok great i have tried and it work. Man you are god really thankssssssss |
|
@HpNoTiQ56 I don't understand what happen |
|
Hello @MCG-pok! |
What is the name of the repo on Docker Hub? |
|
@MCG-pok how we can have the docker image and setup it please ? |
|
@Fairy-Jeux @ilike2burnthing will update flaresolverr. A new version is coming. He's doing some testing and will put the new version on the repo. |
|
For me it's not working with animetorrents' login page, resulting in the same loop. |
|
Getting round to testing now. It may be the case that #1036 is still an issue, but that this PR just gets us back to normal. |
|
Was able to reproduce the same issue with no change on code. |
|
In testing I had some working (including YGG), but not others. Went back to check YGG, and it's no longer working for me. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
There are currently 3 competing solutions in PRs:
I've limited time at the moment, as does the owner, so haven't been able to test these, nevermind compare them. Hopefully that will change soon. Until then, people can use whichever works best for them with the provided images or running/building from source. |
I also have this issue while using the PR code, on animetorrents. Used a long timeout (nothing is behind a VPN) just to verify that it is not the case of #1272 (comment) If there is anything else I can provide, feel free to @ me. |
|
Not having much luck on speed.cd or hd-space either |
|
Stopped working again unfortunately :( |
|
See the other PRs. |
|
Hello, Element.prototype.attachShadow = function (params) You can just query the dom the same way and see if it is accessible. if accesable, then it was forged somewhere. Will omit this Need to focus on essential part. |
|
Can confirm after building the docker container with the changes it worked. I'm not running in Docker per se, but in K8s. Only thing I had to do that was driving me mad was adjust the amount of memory the pod was allotted and now its good. Bit slow even when no challenge detected, but good. |
|
I repeat, the version that works perfectly is this one: 21hsmw/flaresolverr:nodrivertest |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Use this version alexfozor/flaresolverr:pr-1300-experimental |
This comment was marked as duplicate.
This comment was marked as duplicate.
Try this one then ghcr.io/thephaseless/byparr:latest |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not a flaresolverr maintainer)
some quick suggestions
| """ | ||
| }) | ||
| except Exception as e: | ||
| logging.debug("Driver init exception: %s", repr(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| logging.debug("Driver init exception: %s", repr(e)) | |
| logging.debug("Driver init exception: %r", e) |
| logging.debug("Cloudflare verify checkbox not found on the page.") | ||
| logging.debug("Attempted to click on iframe body") | ||
| except Exception as e: | ||
| logging.debug("Cloudflare verify checkbox not found on the page. %s", repr(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| logging.debug("Cloudflare verify checkbox not found on the page. %s", repr(e)) | |
| logging.debug("Cloudflare verify checkbox not found on the page. %r", e) |
Hi ! Here is something fixing issue #1253
At least it works for me since yesterday 🙂
Here is the problem as I understood it:
The checkbox is in a closed shadow root, inside an iframe, inside a closed shadow root. And you can’t get elements in a closed shadow-root.
Most of the work comes from @alexandervlk, here
He made the
_init_driverfunction: it inject a script before page loading that make the first shadow-root open.This is allowing to run a js script to get the Iframe in the first shadow-root (
get_shadowed_iframefunction) , and then switch the driver to the IframeThen, there is the last closed shadow-root. I was not able to find how to make it open. The
_init_driverdoes not inject in the iFrame, and I can’t find how to do it. So I am not able to get the checkbox for now.But I found a workaround by selecting the iframe body (which is just before this last closed shadow-root in DOM tree) and then manage to click on the checkbox from the body.
I never coded in python before, nor I made a pull request on a public github, so be kind 🙏