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

IUAM challenge returned unexpected answer #253

Closed
pigfrown opened this issue May 18, 2019 · 1 comment
Closed

IUAM challenge returned unexpected answer #253

pigfrown opened this issue May 18, 2019 · 1 comment
Labels
duplicate outdated deps Errors associated with using an old peer dependency

Comments

@pigfrown
Copy link

Cloudflare have updated? I get the same exception on multiple cloudflare protected sites.

Version number

Run pip show cfscrape and paste the output below:

pip show cfscrape
Name: cfscrape
Version: 2.0.5
Summary: A simple Python module to bypass Cloudflare's anti-bot page. See https://github.com/Anorov/cloudflare-scrape for more information.
Home-page: https://github.com/Anorov/cloudflare-scrape
Author: Anorov
Author-email: [email protected]
License: UNKNOWN
Location: /home/user/scratch/exchanges/venv/lib/python3.5/site-packages
Requires: requests
Required-by:

Code snippet experiencing the issue

In [5]: import cfscrape

In [6]: scraper = cfscrape.create_scraper()

In [7]: scraper.get("https://wuxiaworld.online")

Complete exception and traceback

ValueError                                Traceback (most recent call last)
~/scratch/exchanges/venv/lib/python3.5/site-packages/cfscrape/__init__.py in solve_challenge(self, body, domain)
    297         try:
--> 298             float(result)
    299         except Exception:

ValueError: could not convert string to float: b'undefined'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
<ipython-input-7-8a883b54c9bd> in <module>
----> 1 scraper.get("https://wuxiaworld.online")

~/scratch/exchanges/venv/lib/python3.5/site-packages/requests/sessions.py in get(self, url, **kwargs)
    544
    545         kwargs.setdefault('allow_redirects', True)
--> 546         return self.request('GET', url, **kwargs)
    547
    548     def options(self, url, **kwargs):

~/scratch/exchanges/venv/lib/python3.5/site-packages/cfscrape/__init__.py in request(self, method, url, *args, **kwargs)
    130         # Check if Cloudflare anti-bot "I'm Under Attack Mode" is enabled
    131         if self.is_cloudflare_iuam_challenge(resp):
--> 132             resp = self.solve_cf_challenge(resp, **kwargs)
    133
    134         return resp

~/scratch/exchanges/venv/lib/python3.5/site-packages/cfscrape/__init__.py in solve_cf_challenge(self, resp, **original_kwargs)
    183
    184         # Solve the Javascript challenge
--> 185         answer, delay = self.solve_challenge(body, domain)
    186         params["jschl_answer"] = answer
    187

~/scratch/exchanges/venv/lib/python3.5/site-packages/cfscrape/__init__.py in solve_challenge(self, body, domain)
    299         except Exception:
    300             raise ValueError(
--> 301                 "Cloudflare IUAM challenge returned unexpected answer. %s" % BUG_REPORT
    302             )
    303

ValueError: Cloudflare IUAM challenge returned unexpected answer. Cloudflare may have changed their technique, or there may be a bug in the script.

Please read https://github.com/Anorov/cloudflare-scrape#updates, then file a bug report at https://github.com/Anorov/cloudflare-scrape/issues."

URL of the Cloudflare-protected page

https://wuxiaworld.online/

@pigfrown pigfrown added the bug label May 18, 2019
@ghost ghost removed the bug label May 18, 2019
@ghost
Copy link

ghost commented May 19, 2019

@pigfrown You're using a seriously outdated version of nodejs.
Duplicate of #241

@ghost ghost closed this as completed May 19, 2019
@ghost ghost added the duplicate label May 19, 2019
@ghost ghost added the outdated deps Errors associated with using an old peer dependency label May 24, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate outdated deps Errors associated with using an old peer dependency
Projects
None yet
Development

No branches or pull requests

1 participant