codemanki / cloudscraper

--DEPRECATED -- 🛑 🛑 Node.js library to bypass cloudflare's anti-ddos page
MIT License
599 stars 139 forks source link

CloudflareError: Cloudflare challenge loop #323

Closed mio-19 closed 4 years ago

mio-19 commented 4 years ago

Please attempt to answer the following questions before submitting a new issue:

Please share a minimal working code snippet that reproduces the problem.

Code snippet ```js const request = require('cloudscraper') const fs = require('fs') const util = require('util') const writeFile = util.promisify(fs.writeFile) async function download(path, url){ try { console.log(`Downloading ${url} to ${path} ...`) const result = await request({ method: 'GET', encoding: null, url: url, }) await writeFile(path, result, 'binary') } catch(e) { console.log(`Download failed: ${url} error=${e}`) throw e}} // download(, ) ```
RedNinjaX commented 4 years ago

Same issue here. Similar setup

fail2ban1337 commented 4 years ago

I have the sam problem .

sevikon commented 4 years ago

Same issue here. Cloudflare challenge loop.

ChrisMichaelPerezSantiago commented 4 years ago

Same issue!

CloudflareError: Cloudflare challenge loop
happyday517 commented 4 years ago

Same issue!

RickDB commented 4 years ago

Same here.

codemanki commented 4 years ago

Should be fixed in 4.6.0. Please update and try again

RedNinjaX commented 4 years ago

Can confirm its working 👌Apologies for any stern feelings

ChrisMichaelPerezSantiago commented 4 years ago

Hi @RedNinjaX and @codemanki ,

After updating the library and having done a test of my api with travis, I still show the error:

CloudflareError: Cloudflare challenge loop
    at onChallenge (/home/travis/build/ChrisMichaelPerezSantiago/animeflv/node_modules/cloudscraper/index.js:298:13)
    at onCloudflareResponse (/home/travis/build/ChrisMichaelPerezSantiago/animeflv/node_modules/cloudscraper/index.js:235:12)
    at onRequestResponse (/home/travis/build/ChrisMichaelPerezSantiago/animeflv/node_modules/cloudscraper/index.js:205:5)
    at Request.<anonymous> (/home/travis/build/ChrisMichaelPerezSantiago/animeflv/node_modules/cloudscraper/index.js:149:7)
    at Object.onceWrapper (events.js:428:26)
    at Request.emit (events.js:321:20)
    at Request.<anonymous> (/home/travis/build/ChrisMichaelPerezSantiago/animeflv/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:321:20)
    at IncomingMessage.<anonymous> (/home/travis/build/ChrisMichaelPerezSantiago/animeflv/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:427:28)
    at IncomingMessage.emit (events.js:333:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  name: 'CloudflareError',
  message: 'Cloudflare challenge loop',
  errorType: 4
}
codemanki commented 4 years ago

@ChrisMichaelPerezSantiago which URI are you trying to access with cloudscraper?

ChrisMichaelPerezSantiago commented 4 years ago

@codemanki

This one: https://animeflv.net/