captchatools


Namecaptchatools JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/Matthew17-21/Captcha-Tools
SummaryPython module to help solve captchas with Capmonster, 2captcha and Anticaptcha API's!
upload_time2023-11-28 02:14:00
maintainer
docs_urlNone
authorMatthew17-21
requires_python
licenseMIT
keywords captcha 2captcha capmonster anticaptcha scraping scrape challenge sneakers
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Captcha Tools
Python module to help solve captchas with Capmonster, 2Captcha and Anticaptcha API's!

#### Go(lang)
To see documentation for the Go implementation, [click here](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go)

# Install
```python
pip3 install captchatools
```
##### To update
```python
pip3 install -U captchatools
```
# How to use
### Basic usage
```python
import captchatools
solver = captchatools.new_harvester(solving_site="capmonster", api_key="YOUR API KEY", sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", captcha_url="https://www.google.com/recaptcha/api2/demo")
captcha_answer = solver.get_token()
```
or
```python
from captchatools import new_harvester
solver = new_harvester(solving_site=1, api_key="YOUR API KEY", sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", captcha_url="https://www.google.com/recaptcha/api2/demo")
captcha_answer = solver.get_token()
```
### new_harvester() Parameters:
| Parameter | Required |  Type  | Default | Description|
| :-------------: |:-------------:| :-----:| :-----:| :-----:|
| api_key | true | String| -| The API Key for the captcha solving site|
| solving_site| true| String (name of site) or int (site ID) | "capmonster"| The captcha solving site that will be used. Refer to [the site IDs](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#site-specific-support)|
| sitekey| true | String | - | Sitekey from the site where captcha is loaded|
| captcha_url | true| String | - | URL where the captcha is located|
| captcha_type| false| String | "v2" | Type of captcha you are solving. Either captcha `image`, `v2`, `v3`,`hcaptcha` (`hcap` works aswell) or `hcaptchaturbo`|
| invisible_captcha| false | bool | false | If the captcha is invisible or not.<br />__This param is only required when solving invisible captchas__|
| min_score | false | double |0.7 | Minimum score for v3 captchas.<br />__This param is only required when solving V3 and it needs a higher / lower score__|
| action | false | String | "verify" | Action that is associated with the V3 captcha.<br />__This param is only required when solving V3 captchas__|
| soft_id | false | int | - |2captcha Developer ID. <br /> Developers get 10% of spendings of their software users. |
### get_token() Parameters:
| Field | Required |  Type  |  Description|
| :-------------: |:-------------:|  :-----:| :-----:|
| b64_img | false | string |  Base64 encoded captcha image<br />__This param is only required when solving image captchas__|
| proxy| false | string |  Proxy to be used to solve captchas.<br />This will make the captcha be solved from the proxy ip<br /><br />Format: `ip:port:user:pass` |
| proxy_type | false | string |  Type of the proxy being used. Options are:<br /> `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`|
| user_agent | false | string |  UserAgent that will be passed to the service and used to solve the captcha |
| rq_data | false | string |  Custom data that is used in some implementations of hCaptcha. Most of the times, you want to set the  `invisible_captcha` param to `true`.|
### Examples
##### Example - V2 Captcha / Basic usage
```python
from captchatools import new_harvester

def main():
    harvester = new_harvester(
        api_key="CHANGE THIS", 
        solving_site="capsolver",
        captcha_type="v2",
        sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
        captcha_url="https://www.google.com/recaptcha/api2/demo"
    )
    answer = harvester.get_token()
```
##### Example - V3 Captcha
```python
from captchatools import new_harvester

def main():
    harvester = new_harvester(

        api_key="CHANGE THIS", 
        solving_site="capsolver",

        captcha_type="v3",
        sitekey="6LcR_okUAAAAAPYrPe-HK_0RULO1aZM15ENyM-Mf",
        captcha_url="https://antcpt.com/score_detector/",
        action="homepage",
        min_score=0.7
    )
    token = harvester.get_token()
```
##### Example - Image captcha
```python
from captchatools import new_harvester

def main():
    harvester = new_harvester(
        api_key="CHANGE THIS", 
        solving_site="capsolver",
        captcha_type="image",
    )
    token = harvester.get_token(b64_img="iVBORw0KGgoAAAANSUhEUgAAAUQAAAAxCAYAAACictAAAAAACXBIWXMAAAsTAAALEwEAmpw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COVjOibUP7ltc0h/wAwp/5cKrkfB4lEzE+BE6T7b6wLaKRSNe9J/VV+p6sSrbevjmiC+8rPZCvgk+S1r4vAq+qXDK2V+l8GIwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGA/LEf2oS4NVP9R70AAAAAElFTkSuQmCC")
```
##### Example - Additional captcha data
```python
from captchatools import new_harvester

def main():
    harvester = new_harvester(
        api_key="CHANGE THIS", 
        solving_site="capsolver",
        captcha_type="v2",
        sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
        captcha_url="https://www.google.com/recaptcha/api2/demo"
    )

    token = harvester.get_token(
        proxy="ip:port:user:pass", 
        proxy_type="http", 
        user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
    )
```

# Supported Sites
- **[Capmonster](https://capmonster.cloud/)**
- **[2Captcha](https://www.2captcha.com/)**
- **[Anticaptcha](https://www.anti-captcha.com/)**
- **[Capsolver](https://www.capsolver.com/)**
- **[CaptchaAI](https://captchaai.com/)**

### Site-Specific Support:
| Site            | Site ID |Captcha Types  Supported    |  Task Types Supported|
| :-------------: |:-------------:| :-----:| :-----:|
| Capmonster      | captchatools.CapmonsterSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha | ImageToTextTask,<br/>NoCaptchaTask,<br/> NoCaptchaTaskProxyless,<br/> RecaptchaV3TaskProxyless,<br />HCaptchaTaskProxyless |
| Anticaptcha     | captchatools.AnticaptchaSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |    ImageToTextTask,<br/> RecaptchaV2Task<br/>  RecaptchaV2TaskProxyless,<br />RecaptchaV3TaskProxyless,<br />HCaptchaTaskProxyless |
| 2Captcha        | captchatools.TwoCaptchaSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |   - |
| Capsolver        | captchatools.CapsolverSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha<br />HcaptchaTurbo      |   - |
| CaptchaAI        | captchatools.CaptchaAISite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |   - |



# Recommendations
1. For 2Captcha, don't run more than 60 tasks per API key.
2. Handle errors appropriately.
    * If a `ErrNoBalance` is thrown, tasks should stop. Some sites will temporarily ban IP's if constant requests come in.

# Errors
| Errors | Returned When |
| :--------:| :-----:|
| `ErrNoBalance` | Balance is below 0 for captcha solving site|
| `ErrWrongAPIKey` | Incorrect API Key for captcha solving site|
| `ErrWrongSitekey` | Incorrect sitekey |
| `ErrIncorrectCapType` | Incorrectly chose a captcha type. When initializing a new harvester. Refer to [the captcha types](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#config-struct-fields) |
| `ErrNoHarvester` | When the user did not / incorrectly chose a captcha harvester. Refer to the ["how to use" guide](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#how-to-use) |

##### Error Handling
```python
from captchatools import new_harvester, exceptions as captchaExceptions,

def main():
    try:
        harvester = new_harvester()
        token = harvester.get_token()
    except captchaExceptions.NoHarvesterException:
        print("I need to set my captcha harvester!")
```



# Changelog
### 1.4.1
##### What's new
1. Added CaptchaAI
2. Removed internal redundant code
3. Fix creating a new harvester if pass in the ID
### 1.3.0
##### What's new
1. Get Balance Support
2. Proxy Support
3. User Agent Support
4. Text image captcha support
5. Better internal handling
6. Capsolver support 

##### Important Changes
* It is recommend to use the `new_harvester` function rather than the old `captcha_harvesters`


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Matthew17-21/Captcha-Tools",
    "name": "captchatools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "captcha,2captcha,capmonster,anticaptcha,scraping,scrape,challenge,sneakers",
    "author": "Matthew17-21",
    "author_email": "admin@monumentalshopping.com",
    "download_url": "https://files.pythonhosted.org/packages/6b/38/01200f5b8169219002728ccddbad8cc50759e523c0884b7e811092d27352/captchatools-1.5.0.tar.gz",
    "platform": null,
    "description": "# Captcha Tools\nPython module to help solve captchas with Capmonster, 2Captcha and Anticaptcha API's!\n\n#### Go(lang)\nTo see documentation for the Go implementation, [click here](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go)\n\n# Install\n```python\npip3 install captchatools\n```\n##### To update\n```python\npip3 install -U captchatools\n```\n# How to use\n### Basic usage\n```python\nimport captchatools\nsolver = captchatools.new_harvester(solving_site=\"capmonster\", api_key=\"YOUR API KEY\", sitekey=\"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\", captcha_url=\"https://www.google.com/recaptcha/api2/demo\")\ncaptcha_answer = solver.get_token()\n```\nor\n```python\nfrom captchatools import new_harvester\nsolver = new_harvester(solving_site=1, api_key=\"YOUR API KEY\", sitekey=\"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\", captcha_url=\"https://www.google.com/recaptcha/api2/demo\")\ncaptcha_answer = solver.get_token()\n```\n### new_harvester() Parameters:\n| Parameter | Required |  Type  | Default | Description|\n| :-------------: |:-------------:| :-----:| :-----:| :-----:|\n| api_key | true | String| -| The API Key for the captcha solving site|\n| solving_site| true| String (name of site) or int (site ID) | \"capmonster\"| The captcha solving site that will be used. Refer to [the site IDs](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#site-specific-support)|\n| sitekey| true | String | - | Sitekey from the site where captcha is loaded|\n| captcha_url | true| String | - | URL where the captcha is located|\n| captcha_type| false| String | \"v2\" | Type of captcha you are solving. Either captcha `image`, `v2`, `v3`,`hcaptcha` (`hcap` works aswell) or `hcaptchaturbo`|\n| invisible_captcha| false | bool | false | If the captcha is invisible or not.<br />__This param is only required when solving invisible captchas__|\n| min_score | false | double |0.7 | Minimum score for v3 captchas.<br />__This param is only required when solving V3 and it needs a higher / lower score__|\n| action | false | String | \"verify\" | Action that is associated with the V3 captcha.<br />__This param is only required when solving V3 captchas__|\n| soft_id | false | int | - |2captcha Developer ID. <br /> Developers get 10% of spendings of their software users. |\n### get_token() Parameters:\n| Field | Required |  Type  |  Description|\n| :-------------: |:-------------:|  :-----:| :-----:|\n| b64_img | false | string |  Base64 encoded captcha image<br />__This param is only required when solving image captchas__|\n| proxy| false | string |  Proxy to be used to solve captchas.<br />This will make the captcha be solved from the proxy ip<br /><br />Format: `ip:port:user:pass` |\n| proxy_type | false | string |  Type of the proxy being used. Options are:<br /> `HTTP`, `HTTPS`, `SOCKS4`, `SOCKS5`|\n| user_agent | false | string |  UserAgent that will be passed to the service and used to solve the captcha |\n| rq_data | false | string |  Custom data that is used in some implementations of hCaptcha. Most of the times, you want to set the  `invisible_captcha` param to `true`.|\n### Examples\n##### Example - V2 Captcha / Basic usage\n```python\nfrom captchatools import new_harvester\n\ndef main():\n    harvester = new_harvester(\n        api_key=\"CHANGE THIS\", \n        solving_site=\"capsolver\",\n        captcha_type=\"v2\",\n        sitekey=\"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\",\n        captcha_url=\"https://www.google.com/recaptcha/api2/demo\"\n    )\n    answer = harvester.get_token()\n```\n##### Example - V3 Captcha\n```python\nfrom captchatools import new_harvester\n\ndef main():\n    harvester = new_harvester(\n\n        api_key=\"CHANGE THIS\", \n        solving_site=\"capsolver\",\n\n        captcha_type=\"v3\",\n        sitekey=\"6LcR_okUAAAAAPYrPe-HK_0RULO1aZM15ENyM-Mf\",\n        captcha_url=\"https://antcpt.com/score_detector/\",\n        action=\"homepage\",\n        min_score=0.7\n    )\n    token = harvester.get_token()\n```\n##### Example - Image captcha\n```python\nfrom captchatools import new_harvester\n\ndef main():\n    harvester = new_harvester(\n        api_key=\"CHANGE THIS\", \n        solving_site=\"capsolver\",\n        captcha_type=\"image\",\n    )\n    token = harvester.get_token(b64_img=\"iVBORw0KGgoAAAANSUhEUgAAAUQAAAAxCAYAAACictAAAAAACXBIWXMAAAsTAAALE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sl6G6YCOVjOibUP7ltc0h/wAwp/5cKrkfB4lEzE+BE6T7b6wLaKRSNe9J/VV+p6sSrbevjmiC+8rPZCvgk+S1r4vAq+qXDK2V+l8GIwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGA/LEf2oS4NVP9R70AAAAAElFTkSuQmCC\")\n```\n##### Example - Additional captcha data\n```python\nfrom captchatools import new_harvester\n\ndef main():\n    harvester = new_harvester(\n        api_key=\"CHANGE THIS\", \n        solving_site=\"capsolver\",\n        captcha_type=\"v2\",\n        sitekey=\"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\",\n        captcha_url=\"https://www.google.com/recaptcha/api2/demo\"\n    )\n\n    token = harvester.get_token(\n        proxy=\"ip:port:user:pass\", \n        proxy_type=\"http\", \n        user_agent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36\"\n    )\n```\n\n# Supported Sites\n- **[Capmonster](https://capmonster.cloud/)**\n- **[2Captcha](https://www.2captcha.com/)**\n- **[Anticaptcha](https://www.anti-captcha.com/)**\n- **[Capsolver](https://www.capsolver.com/)**\n- **[CaptchaAI](https://captchaai.com/)**\n\n### Site-Specific Support:\n| Site            | Site ID |Captcha Types  Supported    |  Task Types Supported|\n| :-------------: |:-------------:| :-----:| :-----:|\n| Capmonster      | captchatools.CapmonsterSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha | ImageToTextTask,<br/>NoCaptchaTask,<br/> NoCaptchaTaskProxyless,<br/> RecaptchaV3TaskProxyless,<br />HCaptchaTaskProxyless |\n| Anticaptcha     | captchatools.AnticaptchaSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |    ImageToTextTask,<br/> RecaptchaV2Task<br/>  RecaptchaV2TaskProxyless,<br />RecaptchaV3TaskProxyless,<br />HCaptchaTaskProxyless |\n| 2Captcha        | captchatools.TwoCaptchaSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |   - |\n| Capsolver        | captchatools.CapsolverSite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha<br />HcaptchaTurbo      |   - |\n| CaptchaAI        | captchatools.CaptchaAISite| Image captchas,<br/> Recaptcha V2,<br />Recaptcha V3,<br />HCaptcha      |   - |\n\n\n\n# Recommendations\n1. For 2Captcha, don't run more than 60 tasks per API key.\n2. Handle errors appropriately.\n    * If a `ErrNoBalance` is thrown, tasks should stop. Some sites will temporarily ban IP's if constant requests come in.\n\n# Errors\n| Errors | Returned When |\n| :--------:| :-----:|\n| `ErrNoBalance` | Balance is below 0 for captcha solving site|\n| `ErrWrongAPIKey` | Incorrect API Key for captcha solving site|\n| `ErrWrongSitekey` | Incorrect sitekey |\n| `ErrIncorrectCapType` | Incorrectly chose a captcha type. When initializing a new harvester. Refer to [the captcha types](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#config-struct-fields) |\n| `ErrNoHarvester` | When the user did not / incorrectly chose a captcha harvester. Refer to the [\"how to use\" guide](https://github.com/Matthew17-21/Captcha-Tools/tree/main/captchatools-go#how-to-use) |\n\n##### Error Handling\n```python\nfrom captchatools import new_harvester, exceptions as captchaExceptions,\n\ndef main():\n    try:\n        harvester = new_harvester()\n        token = harvester.get_token()\n    except captchaExceptions.NoHarvesterException:\n        print(\"I need to set my captcha harvester!\")\n```\n\n\n\n# Changelog\n### 1.4.1\n##### What's new\n1. Added CaptchaAI\n2. Removed internal redundant code\n3. Fix creating a new harvester if pass in the ID\n### 1.3.0\n##### What's new\n1. Get Balance Support\n2. Proxy Support\n3. User Agent Support\n4. Text image captcha support\n5. Better internal handling\n6. Capsolver support \n\n##### Important Changes\n* It is recommend to use the `new_harvester` function rather than the old `captcha_harvesters`\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python module to help solve captchas with Capmonster, 2captcha and Anticaptcha API's!",
    "version": "1.5.0",
    "project_urls": {
        "Homepage": "https://github.com/Matthew17-21/Captcha-Tools"
    },
    "split_keywords": [
        "captcha",
        "2captcha",
        "capmonster",
        "anticaptcha",
        "scraping",
        "scrape",
        "challenge",
        "sneakers"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eaf17faaa20ffd68314215da2e3c57076c2c89846ab05464f1b7167dc8a9a80b",
                "md5": "c1d48c646f3b2aa8ba61cf137f26486f",
                "sha256": "43b651f7603be5725df94e4d715e0ff770efec44b62bb6076eb9a63516c74d94"
            },
            "downloads": -1,
            "filename": "captchatools-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c1d48c646f3b2aa8ba61cf137f26486f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16394,
            "upload_time": "2023-11-28T02:13:58",
            "upload_time_iso_8601": "2023-11-28T02:13:58.468120Z",
            "url": "https://files.pythonhosted.org/packages/ea/f1/7faaa20ffd68314215da2e3c57076c2c89846ab05464f1b7167dc8a9a80b/captchatools-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b3801200f5b8169219002728ccddbad8cc50759e523c0884b7e811092d27352",
                "md5": "1ee7730da4b2eed9bd98a8b08b4bd82a",
                "sha256": "755ed685a93f6139608b5277ef0410f8682b3522e98f52d9cc3edff9df38ca12"
            },
            "downloads": -1,
            "filename": "captchatools-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1ee7730da4b2eed9bd98a8b08b4bd82a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15282,
            "upload_time": "2023-11-28T02:14:00",
            "upload_time_iso_8601": "2023-11-28T02:14:00.605898Z",
            "url": "https://files.pythonhosted.org/packages/6b/38/01200f5b8169219002728ccddbad8cc50759e523c0884b7e811092d27352/captchatools-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-28 02:14:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Matthew17-21",
    "github_project": "Captcha-Tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "captchatools"
}
        
Elapsed time: 0.13933s