Closed mio-19 closed 4 years ago
Same issue here. Similar setup
I have the sam problem .
Same issue here. Cloudflare challenge loop.
Same issue!
CloudflareError: Cloudflare challenge loop
Same issue!
Same here.
Should be fixed in 4.6.0
. Please update and try again
Can confirm its working 👌Apologies for any stern feelings
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
}
@ChrisMichaelPerezSantiago which URI are you trying to access with cloudscraper?
@codemanki
This one: https://animeflv.net/
Please attempt to answer the following questions before submitting a new issue:
https://www.spigotmc.org/resources/vault.34315/download?version=271004
https://www.spigotmc.org/resources/lightapi-fork.48247/download?version=305658
etcPlease 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(