Closed ghost closed 5 years ago
@doko-desuka :rofl:
those dirty bastards ;P I only just got home from the misses its 0130 i'll update in the morning ;P
fuck it... updated dev branch..
which file and lines that should be updated? i have no clue...
@grasssnake123
cd your-project
npm i --save "git://github.com/pro-src/cloudscraper.git#patch-1"
# The following command will remove node_modules and do a fresh install
npm ci
There will be a new release soon so remember to install cloudscraper from NPM once it's published with the fix.
@pro-src thanks it works now
@pro-src
new error after repeated request:
Unhandled rejection CaptchaError: captcha
at validate (/../nodejs/node_modules/cloudscraper/index.js:212:11)
at processRequestResponse (/../nodejs/node_modules/cloudscraper/index.js:180:5)
at Object.onceWrapper (events.js:281:20)
at Request.emit (events.js:193:13)
at Request.
@grasssnake123 Copy headers from your web browser to use with cloudscraper. If you're still having issues, lets us know.
3.6.0 has been released. @pro-src saves the day :)
@pro-src Adding this header, seems works great now
var cloudscraper = require('cloudscraper');
var fs = require('fs');
cloudscraper.defaultParams.headers = {
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.9"
};
cloudscraper.get({ gzip: true, uri: 'https://subscene.com/content/images/logo.gif', encoding: null }).then(bufferAsBody => fs.writeFileSync('./test.gif', bufferAsBody));
Hi @pro-src, I know you meant the shout-out as a joke, but still, you were thinking about me, in a way. Thanks for the heads up.
@doko-desuka It was double entendre. You're welcome. :)
@codemanki Ouput from cf-debug:
They added
g = String.fromCharCode
.We'll need to update the regex that strips statement to retain it.@VeNoMouS