Closed Revadike closed 5 years ago
Perhaps allow us the pass an instance of the request
module in cloudscraper constructor.
This is a library, not a class/prototype. It doesn't have a constructor. Anyway, it could have provided a helper function to configure the defaults, for sure. I actually forked it locally just because of this requirement. I thought about making a PR, but it doesn't look like it's being actively maintained.
@dnunes if you make a PR i would be happy to merge and release it :)
I thought about making a PR, but it doesn't look like it's being actively maintained.
I thought the same until i saw @codemanki reply. Maybe some of the PR's and open issues could be cleaned up so it looks a bit more active mate?
Hey, @codemanki, good to see it's still being worked on. My solution is a pretty hacky one just to work on my personal needs (cloudscraper.setRequester(<request>)
), but I'm sure we can think of something better and more general to make a PR. If I get to it, I'll sure make a PR here. Thanks for the your work.
@mavrick will do that over the weekend. I really want to merge the promise support PR. @dnunes got it. Hope you'll get to it :) Thank you for contributing!
@codemanki I like @dnunes idea having more control over the requestjs object so we can set custom headers, http agents etc. Cheers, looking forward to using the library more 🥇
Perhaps cloudscraper
could even substitute it for the request
library, so we only need one library to make HTTP requests. Though, it would require detecting cloudflare on sites, otherwise it will always wait 5 seconds for every request.
There is support for this in the v3.0.0 branch. This can be closed.
I'd like to see support for request defaults such as
jar: true
, which remembers cookies for subsequent requests.https://github.com/request/request#convenience-methods