Skip to content

Commit b9bd575

Browse files
author
Andrei
authored
Merge pull request #20 from AndreiDrang/main
Upd images
2 parents 34ff520 + 9a14db0 commit b9bd575

11 files changed

Lines changed: 36 additions & 26 deletions

File tree

.github/workflows/sphinx.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ jobs:
2121
run: pip install -r src/requirements.txt
2222

2323
- name: Build docs
24-
run: |
25-
cd docs/ && \
26-
pip install -r requirements.txt && \
27-
make html -e
24+
run: make doc
2825

2926
- name: Deploy
3027
uses: peaceiris/actions-gh-pages@v3

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ tests:
3535

3636
doc:
3737
cd docs/ && \
38-
make html
38+
make html -e

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[![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)
1616

1717

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

2020
Tested on UNIX based OS.
2121

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

3030
***
3131

32+
## How to install?
33+
34+
We recommend using the latest version of Python. `python3-captchaai` supports Python 3.7+.
35+
36+
### pip
37+
38+
```bash
39+
pip install python3-captchaai
40+
```
41+
42+
### Source
43+
```bash
44+
git clone https://github.com/AndreiDrang/python3-captchaai.git
45+
cd python3-captchaai
46+
python setup.py install
47+
```
48+
49+
## How to test?
50+
51+
1. You need set ``API_KEY`` in your environment(get this value from you account).
52+
2. Run command ``make tests``, from root directory.
53+
3254
### Additional info
3355
1. [Library usage examples && Docs](https://andreidrang.github.io/python3-captchaai/)
3456
2. [Capsolver errors list](https://captchaai.atlassian.net/wiki/spaces/CAPTCHAAI/pages/426145/)
3557

3658

37-
### Get API Key to work with the library
59+
### How to get API Key to work with the library
3860
1. On the page - https://dashboard.capsolver.com/overview/user-center
3961
2. Find it: ![img.png](files/img.png)

docs/conf.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
# Configuration file for the Sphinx documentation builder.
2-
#
3-
# This file only contains a selection of the most common options. For a full
4-
# list see the documentation:
5-
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6-
71
# -- Path setup --------------------------------------------------------------
82

93
import os
104
import sys
115

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

188
os.chdir("../")

docs/modules/main/info.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ The library is intended for software developers and is used to work with the [Ca
2626

2727
## How to install?
2828

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

3231
### pip
3332

files/img.png

273 KB
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5.1"
1+
__version__ = "0.5.2"

src/python3_captchaai/core/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def _create_task(self, url_postfix: str = EndpointPostfixEnm.CREATE_TASK.value)
115115

116116
def _get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_RESULT.value) -> CaptchaResponseSer:
117117
"""
118-
Function send SYNC request to service and wait for result
118+
Method send SYNC request to service and wait for result
119119
"""
120120
# initial waiting
121121
time.sleep(self.__params.sleep_time)

src/python3_captchaai/core/enum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ class ResponseStatusEnm(str, MyEnum):
9595

9696
class ProxyType(str, MyEnum):
9797
"""
98-
Enum store results `status` field variants
98+
Enum store proxy types
9999
100100
Notes:
101101
https://captchaai.atlassian.net/wiki/spaces/CAPTCHAAI/pages/426124
102102
"""
103103

104104
http = "http" # usual http / https
105-
https = "https" # try this only if "http" doesn't work (required by some custom proxy servers)
105+
https = "https"
106106
socks4 = "socks4"
107107
socks5 = "socks5"

src/python3_captchaai/core/serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TaskSer(BaseModel):
2020

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

2525

2626
class RequestGetTaskResultSer(PostRequestSer):

0 commit comments

Comments
 (0)