Skip to content
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

(feature) Add captcha event hook #297

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

(feature) Add captcha event hook #297

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 29, 2019

@ghost ghost added the enhancement label Sep 29, 2019
@ghost ghost requested a review from Anorov September 29, 2019 22:24
@ghost ghost mentioned this pull request Sep 29, 2019
7 tasks
def cloudflare_is_bypassed(self, url, resp=None):
cookie_domain = ".{}".format(urlparse(url).netloc)
return (
self.cookies.get("cf_clearance", None, domain=cookie_domain) or
(resp and resp.cookies.get("cf_clearance", None, domain=cookie_domain))
)

def handle_captcha_challenge(self, resp, url):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really make sense to accept the url argument here and it's not documented but we might want to wait until the next major release to remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants