Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Support recursive challenge solving #66

Merged
merged 12 commits into from
Dec 9, 2018

Conversation

codemanki
Copy link
Owner

@codemanki codemanki commented Dec 4, 2018

Fixes issue #65

What has been done:

  • Everytime CF returns any response, check it for errors, new challenge, captcha or so
  • Remove manual 302 processing, use followAllRedirects flag from the request library
  • BREAKING CHANGE Before this, when any error has been detected, the callback was called with an incorrect order: callback(.., body, response); instead of return callback(..., response, body);
  • Some code fixes, cleanup and so

What yet to be done:

  • Set a limit of recursive calls, to prevent many requests to be done
  • Bump major version before releasing

@Ekliptor
Copy link

Ekliptor commented Dec 5, 2018

I just checked it in a loop opening some of the URLs I had problems with. Works great so far.
I think all that's needed for production is a simple counter for recursive solving (max 3?) as you already mentioned to prevent an infinite solving loop. Then this is ready for production.

@codemanki
Copy link
Owner Author

@codemanki thanks for giving it a try. I will soon publish this version

@codemanki
Copy link
Owner Author

@Ekliptor done. Could you please check it once again? Now it only allows max 3 challenges

@codemanki codemanki changed the title [WIP] Support recursive challenge solving Support recursive challenge solving Dec 9, 2018
@codemanki codemanki merged commit 633faba into master Dec 9, 2018
@codemanki codemanki deleted the feature/solve-multiple-challenges branch December 9, 2018 10:39
@Ekliptor
Copy link

thanks for your very thorough work and fast responses.
I merged your update with my codebase at https://github.com/Ekliptor/apputils/blob/master/src/cloudscraper/cloudscraper.ts

We are using it in production since Monday and working great so far ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants