codemanki / cloudscraper

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

Fixing 200 HTTP response with empty body #340

Open Yooooomi opened 4 years ago

Yooooomi commented 4 years ago

I just encountered a case where cloudflare were returning 200 OK, but the code was still throwing an error. Fixed that by checking the length of the body and also the response status code.