Closed williamoliveira closed 7 years ago
I suppose you could write a nodejs app to act as an HTTP proxy, where the proxy itself uses cloudscraper to bypass cloudflare and then serves the content back to the browser.
Yeah, I could, I am currently doing the scrapping on backend with cheerio but I am trying to make my app serverless
Are you looking to use it in a specific browser? If you don't have anything specific in mind, you could use http://electron.atom.io/ with Chromium and use cloudscraper to load all of the content to display clientside. You may be able to hook into the electron API to force all of the traffic directly through cloudscraper.
Also, you could write the NodeJS implementation and run a local instance of the HTTP proxy, however that'd require installing the NodeJS binaries which might not be desirable.
That wouldnt work for me, its a normal web application. I will fork this project and see if I can modify to use axios or something instead of request
@williamoliveira Did you make any progress on browser side usage of cloudscraper?
Nope, I dropped the project I was working on
These tests seem to indicate that request
has had browser support for years. Use a good bundler such as webpack and everything should work.
Edit: The only dependencies that cloudscraper has is request
and the native vm
module. Both webpack and browserify support the way cloudscraper is using the vm module: https://github.com/browserify/vm-browserify.
However, I do think that pulling the parser related bits out into a separate js file would be great.
Could this be tweaked to work in the browser also?