cloudflare-scrape icon indicating copy to clipboard operation
cloudflare-scrape copied to clipboard

cloudflare-scrape isn't working on another site

Open rocky-the-dev opened this issue 5 years ago • 0 comments
trafficstars

Please confirm the following statements and check the boxes before creating an issue:

  • [*] I've upgraded cfscrape with pip install -U cfscrape
  • [*] I'm using Node version 10 or higher
  • [*] The site protection I'm having issues with is from Cloudflare
  • [*] I'm not using Tor, a VPN, or an anonymizing proxy

Python version number

Run python --version and paste the output below:

Python 3.8.5

node --version
v10.21.0

cfscrape version number

Run pip show cfscrape and paste the output below:

Name: cfscrape
Version: 2.1.1
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: /usr/local/lib/python3.8/site-packages
Requires: requests
Required-by: 

Code snippet involved with the issue

scraper = cfscrape.create_scraper()
print(scraper.get(url).content)

Complete exception and traceback

(If the problem doesn't involve an exception being raised, leave this blank)

Started running App
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/cfscrape/__init__.py", line 251, in solve_challenge
    challenge, ms = re.search(
AttributeError: 'NoneType' object has no attribute 'groups'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "script.py", line 110, in <module>
    app.run()
  File "script.py", line 21, in run
    search_page_html = self.get_html_from_url(self.search_url, self.HEADERS)
  File "script.py", line 85, in get_html_from_url
    return scraper.get(url).content
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/cfscrape/__init__.py", line 129, in request
    resp = self.solve_cf_challenge(resp, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/cfscrape/__init__.py", line 204, in solve_cf_challenge
    answer, delay = self.solve_challenge(body, domain)
  File "/usr/local/lib/python3.8/site-packages/cfscrape/__init__.py", line 290, in solve_challenge
    raise ValueError(
ValueError: Unable to identify Cloudflare IUAM Javascript on website. 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://www.hurriyetemlak.com/satilik]

URL of Pastebin/Gist with HTML source of protected page

[https://pastebin.com/8C4bhUq7]

rocky-the-dev avatar Sep 20 '20 12:09 rocky-the-dev