Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upd images #20

Merged
merged 10 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ jobs:
run: pip install -r src/requirements.txt

- name: Build docs
run: |
cd docs/ && \
pip install -r requirements.txt && \
make html -e
run: make doc

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ tests:

doc:
cd docs/ && \
make html
make html -e
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[![Lint](https://github.com/AndreiDrang/python3-captchaai/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-captchaai/actions/workflows/lint.yml)


Python3 library for [Capsolver](https://capsolver.com/) service API.
Python 3 library for [Capsolver](https://capsolver.com/) service API.

Tested on UNIX based OS.

Expand All @@ -29,11 +29,33 @@ Or email python-captcha@pm.me

***

## How to install?

We recommend using the latest version of Python. `python3-captchaai` supports Python 3.7+.

### pip

```bash
pip install python3-captchaai
```

### Source
```bash
git clone https://github.com/AndreiDrang/python3-captchaai.git
cd python3-captchaai
python setup.py install
```

## How to test?

1. You need set ``API_KEY`` in your environment(get this value from you account).
2. Run command ``make tests``, from root directory.

### Additional info
1. [Library usage examples && Docs](https://andreidrang.github.io/python3-captchaai/)
2. [Capsolver errors list](https://captchaai.atlassian.net/wiki/spaces/CAPTCHAAI/pages/426145/)


### Get API Key to work with the library
### How to get API Key to work with the library
1. On the page - https://dashboard.capsolver.com/overview/user-center
2. Find it: ![img.png](files/img.png)
10 changes: 0 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

import os
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from pallets_sphinx_themes import ProjectLink

os.chdir("../")
Expand Down
3 changes: 1 addition & 2 deletions docs/modules/main/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ The library is intended for software developers and is used to work with the [Ca

## How to install?

We recommend using the latest version of Python. `python3-captchaai` supports Python
3.7+.
We recommend using the latest version of Python. `python3-captchaai` supports Python 3.7+.

### pip

Expand Down
Binary file modified files/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/python3_captchaai/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.1"
__version__ = "0.5.2"
2 changes: 1 addition & 1 deletion src/python3_captchaai/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _create_task(self, url_postfix: str = EndpointPostfixEnm.CREATE_TASK.value)

def _get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_RESULT.value) -> CaptchaResponseSer:
"""
Function send SYNC request to service and wait for result
Method send SYNC request to service and wait for result
"""
# initial waiting
time.sleep(self.__params.sleep_time)
Expand Down
4 changes: 2 additions & 2 deletions src/python3_captchaai/core/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ class ResponseStatusEnm(str, MyEnum):

class ProxyType(str, MyEnum):
"""
Enum store results `status` field variants
Enum store proxy types

Notes:
https://captchaai.atlassian.net/wiki/spaces/CAPTCHAAI/pages/426124
"""

http = "http" # usual http / https
https = "https" # try this only if "http" doesn't work (required by some custom proxy servers)
https = "https"
socks4 = "socks4"
socks5 = "socks5"
2 changes: 1 addition & 1 deletion src/python3_captchaai/core/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TaskSer(BaseModel):

class RequestCreateTaskSer(PostRequestSer):
task: Optional[TaskSer] = Field(None, description="Task object")
appId: str = Field(APP_ID, description="AppID")
appId: str = Field(APP_ID, description="AppID", const=True)


class RequestGetTaskResultSer(PostRequestSer):
Expand Down
6 changes: 4 additions & 2 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ def run(self):
funcaptcha
keycaptcha
python3
tiktok
python-library
captcha.ai
capsolver
kasada
datadomeslider
mtcaptcha
""",
python_requires=REQUIRES_PYTHON,
zip_safe=False,
Expand Down