codemanki / cloudscraper

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

Unhandled rejection ParserError #192

Closed meet2amit closed 5 years ago

meet2amit commented 5 years ago

Hello team when we try today we got this message this already work before 2 days

`var cloudscraper = require('cloudscraper');

cloudscraper.get('https://app.smartapartmentdata.com/XML/GetInventory.aspx?licenseKey=xxxxxxxxxxxxxxx', function(error, response, body) { if (error) { console.log('Error occurred'); } else { console.log(body, response); } });`

Cloudflare may have changed their technique, or there may be a bug.

Bug Reports: https://github.com/codemanki/cloudscraper/issues

Check the detailed exception message that follows for the cause.

SyntaxError: Challenge evaluation failed: Unexpected token | at solveChallenge (F:\phantanjs\scraper2\node_modules\cloudscraper\index.js:294:21) at processRequestResponse (F:\phantanjs\scraper2\node_modules\cloudscraper\index.js:188:12) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (F:\phantanjs\scraper2\node_modules\request\request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (F:\phantanjs\scraper2\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

codemanki commented 5 years ago

Hi Amit. Thanks for reporting this issue. I have released a new version with a fix literally 20 minutes ago. Please update to the cloudscraper@3.8.0, it should work now

meet2amit commented 5 years ago

ok thank you for your quick update we will check and let you know

meet2amit commented 5 years ago

Sorry to said you Still getting an error but this is different

Unhandled rejection ParserError:

Cloudflare may have changed their technique, or there may be a bug.

Bug Reports: https://github.com/codemanki/cloudscraper/issues

Check the detailed exception message that follows for the cause.

Failed to parse challenge timeout at solveChallenge (F:\phantanjs\scraper2\node_modules\cloudscraper\index.js:300:23) at onCloudflareResponse (F:\phantanjs\scraper2\node_modules\cloudscraper\index.js:197:12) at onRequestResponse (F:\phantanjs\scraper2\node_modules\cloudscraper\index.js:168:5) at Request. (F:\phantanjs\scraper2\node_modules\cloudscraper\index.js:139:7) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (F:\phantanjs\scraper2\node_modules\request\request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (F:\phantanjs\scraper2\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

codemanki commented 5 years ago

3.9.0 is out with a fix!

codemanki commented 5 years ago

Aaaaaand 3.9.1 is also out with an additional fix

meet2amit commented 5 years ago

ok let me check

meet2amit commented 5 years ago

Wrokin

Aaaaaand 3.9.1 is also out with an additional fix

working now

Really Appreciate your quick solution

Thank you