question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesen't work, it keeps running forever.

See original GitHub issue

Before creating an issue, first upgrade cfscrape with pip install -U cfscrape and see if you’re still experiencing the problem. Please also confirm your Node version (node --version or nodejs --version) is version 10 or higher.

Make sure the website you’re having issues with is actually using anti-bot protection by Cloudflare and not a competitor like Imperva Incapsula or Sucuri. And if you’re using an anonymizing proxy, a VPN, or Tor, Cloudflare often flags those IPs and may block you or present you with a captcha as a result.

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

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

Python version number

Run python --version and paste the output below:

Python 3.7.5

cfscrape version number

Run pip show cfscrape and paste the output below:

Name: cfscrape
Version: 2.0.8
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: anorov.vorona@gmail.com
License: UNKNOWN
Location: /usr/local/lib/python3.7/site-packages
Requires: requests
Required-by:

Code snippet involved with the issue

>>> import cfscrape
>>> scraper = cfscrape.create_scraper()
>>> res = scraper.get("https://altadefinizione01-nuovo.link")
**... for ever, doesen't return a result**

Complete exception and traceback

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


URL of the Cloudflare-protected page

https://altadefinizione01-nuovo.link

URL of Pastebin/Gist with HTML source of protected page

https://pastebin.com/mkrSkaMi

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:28 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
AbdullahM0hamedcommented, Nov 27, 2019

Nvm, wrong repo, thought this was cloudscape, my bad😅

BTW, that library has fixed it now, and is used similarly too this one so you should try it: https://github.com/VeNoMouS/cloudscraper

1reaction
pl77commented, Dec 20, 2019

For those of you who can’t wait for a new version to get published to pypi, you can patch it yourself. There is a fix from @alzamer2 in the pull requests:

https://github.com/Anorov/cloudflare-scrape/pull/315

To find where your cfscrape module is stored, the easiest way is with the python interpreter from the environment you want to fix. Type python to open up the interpreter and you’ll be greeted with a similar prompt as the one below:

Python 3.7.4 (default, Aug 13 2019, 20:35:49)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Type the following two commands:

import importlib
importlib.util.find_spec('cfscrape').origin

…which will give you a string path location (similar to the one below):

'/home/user/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py'

Open that __init__.py file in an editor and replace all the contents with the raw contents from the pull request:

raw text from pull request 115

Save it and your cfscrape should work again.

Once the pull request is pushed to pypi just update as normal and the contents will be replaced.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Job succeeded but not pass and keep running forever
I have a runner on cloud when I run the job it return Job succeeded, but it never stop keep running until I...
Read more >
node.js - Running Forever in Ansible Provision Never Fires or ...
But even though Ansible acts like everything is fine, no forever process is started. When I change a few lines to remove the...
Read more >
forever list says "No forever processes running" #483 - GitHub
My hackish/workaround was to temporarily set $HOME to the root's final value just to execute forever start in the init script. Everything (e.g. ......
Read more >
Build stays in 'Running' forever for `depends_on: ["<unknown>"]`
The thinking was that if some of its dependencies fail (or don't otherwise don't run), then the pipeline will register that after-trigger can ......
Read more >
Query runs forever on Synapse Serverless SQL - Microsoft Q&A
we have a problem where OPENROWSET based queries on Synapse Serverless SQL that are now running forever. No errors. One of the queries...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found