Open LexCybermac opened 5 years ago
Hey, thanks for reporting. I noticed the same behaviour myself, and right now I am thinking about what to do about it.
The way I see it, the options are:
Frankly I don't know when I'll have time to work on it but it's on my TODO list.
Hey, this should be resolved now (many thanks to developers of cloudscraper)
Issue appears to be persisting in some capacity, just tried the script now and got countless printouts of variations of the following:
failed to execute request
{ CaptchaError: captcha
at validateResponse (C:\Users\Lex\PatreonScraper\patreon-scraper\node_modules\cloudscraper\index.js:259:11)
at onCloudflareResponse (C:\Users\Lex\PatreonScraper\patreon-scraper\node_modules\cloudscraper\index.js:222:5)
at onRequestResponse (C:\Users\Lex\PatreonScraper\patreon-scraper\node_modules\cloudscraper\index.js:205:5)
at Request.<anonymous> (C:\Users\Lex\PatreonScraper\patreon-scraper\node_modules\cloudscraper\index.js:149:7)
at Object.onceWrapper (events.js:286:20)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.<anonymous> (C:\Users\Lex\PatreonScraper\patreon-scraper\node_modules\request\request.js:1161:10)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Gunzip.<anonymous> (C:\Users\Lex\PatreonScraper\patreon-scraper\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:286:20)
at Gunzip.emit (events.js:203:15)
at Gunzip.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19) name: 'CaptchaError', message: 'captcha' }
It never happened to me, but according to the cloudscraper bug tracker (bug report) some people experience same issue. Right now, I don't think there is an easy & fast way to circumvent it. Maybe you can try to renew your IP address, or I can try to add more timeout/define an timeout option.
No luck changing IP I'm afraid, tried connecting to various VPN servers as well as without and the issue persisted consistently.
Same thing here, except i am constantly getting the error from the start. I tried to edit the config object passed to cloudscraper but that didn't help:
public getFile(identifier: FileUrlQS): RequestPromise<TypedResponse<any>> { const requestOptions: OptionsWithUrl = { ...this.requestBase, json: false, qs: identifier, url: "/file", agentOptions:{ciphers: 'ECDHE-ECDSA-AES128-GCM-SHA256'}, proxy: 'https://195.182.22.178', port: 53281 } return cloudscraper(requestOptions) }
I'm having the same issue from the start too. Please contact me, I'm willing to pay a few beers for this ;)
I am also seeing what I think is the same issue:
failed to execute request
{ CaptchaError: captcha
at validateResponse (/home/amoe/vcs/patreon-scraper/node_modules/cloudscraper/index.js:259:11)
at onCloudflareResponse (/home/amoe/vcs/patreon-scraper/node_modules/cloudscraper/index.js:222:5)
at onRequestResponse (/home/amoe/vcs/patreon-scraper/node_modules/cloudscraper/index.js:205:5)
at Request.<anonymous> (/home/amoe/vcs/patreon-scraper/node_modules/cloudscraper/index.js:149:7)
at Object.onceWrapper (events.js:286:20)
at Request.emit (events.js:198:13)
at Request.<anonymous> (/home/amoe/vcs/patreon-scraper/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at Gunzip.<anonymous> (/home/amoe/vcs/patreon-scraper/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:286:20)
at Gunzip.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19) name: 'CaptchaError', message: 'captcha' }
This is repeated on the console forever.
Invocation command:
./index.ts -s "MYSESSIONID" -o downloaded
Sorry for a long hiatus. I am aware of these problems, but currently I am unable to do anything about them.
I am using a 3rd party cloudflare scraping library, and thus depend on the authors to fix the code according to the changes the Cloudflare periodically pushes. I would like to update the library that is used, but I simply lack time to dive into the Cloudflare anti-bot implementation.
When attempting to run this script no content is downloaded, when looking at the script output in the console the body section appears to contain the markup for a CAPTCHA page leading me to believe that this is the root of the issue.
Example:
`<!DOCTYPE html>\n
\n \n \n