-
Notifications
You must be signed in to change notification settings - Fork 60
Add captcha detection #26
Comments
I've been running into the same problem with another app that I'm building, which is kind of big problem. I've added captcha detection, and instead of just throwing an error, I've added an interface to deathbycaptcha for getting the captcha solved in a relatively short amount of time (15-20 seconds). All of this seems to work pretty good in my initial testing. Hopefully I'll be able to make a pull request within the next few days. |
This has been tested a fair amount with success and is ready to go. @adamlwgriffiths Can I have your permission to create a new branch? |
Awesome! I'll try and get some time to take a look. Hopefully within 24 hours. Why a new branch? If it works we can just merge to master and up the major or minor version - depending on if there's any function changes / new exceptions. On 01/07/2016, at 10:21 PM, Benjamin [email protected] wrote:
|
Ah sorry I assumed code was already included. I'm currently mobile so not really able to interact fully. I guess it would be a major version since its new dependencies which could break unsuspecting users. Re: new branch. On 01/07/2016, at 10:21 PM, Benjamin [email protected] wrote:
|
Hmm, deathbycaptcha isn't a free service. If you want to do this, then it should be optional. I don't want to enforce a paid-for service in the API itself. |
Agreed - captcha handling should be optional, as other alternatives may exist for dealing with them, or simply throwing an exception may be adequate. The code that I was testing was filtering request responses in the same script, but this doesn't make sense for the codebase overall. I'll take your comment into consideration, Adam, as I start examining the API more closely. |
The codebase isn't exactly anything to write home about. I think if each of the This way, all classes can seemlessly get the captcha detection/handling. |
I've made some good progress within the last day. All requests run through the API and are filtered (via both regex and the bs4 interface). I've also added a hook for whatever action/service people may wish to use in order to deal with captchas whenever detected, otherwise defaulting to writing a log message. One tiny bug that I've encountered - I'm seeing loop behavior in logic where I would not expect. Should be quick to get that ironed out though. Can I have permission to create a branch in order to save my work? |
Ahhh, if you just fork the repo you can commit all you want. |
I was finally was able to make a commit on the captcha plugin. |
Hey Ben, If you want I can try and find some time to add a basic framework for this that you can then plug your DBC into. That said, I'm pretty busy at the moment. |
Detect when amazon shoots a captcha at us and raise an appropriate error instead of letting our soup code fail with None dereferences.
See this issue for more information on the format of the captcha and result of it being sent:
#25
The text was updated successfully, but these errors were encountered: