Skip to content

Commit e4fae1e

Browse files
authored
Merge pull request #170 from AndreiDrang/master
2 parents ce0f2b1 + eda564e commit e4fae1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+3060
-4453
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ updates:
44
directory: "/" # Location of package manifests
55
schedule:
66
interval: "weekly"
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
commit-message:
13+
prefix: "[github-actions] "

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
23+
python-version: ["3.9", "3.10", "3.11"]
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v3
28+
uses: actions/setup-python@v5
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

.github/workflows/install.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
23+
python-version: ["3.9", "3.10", "3.11"]
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v3
28+
uses: actions/setup-python@v5
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

.github/workflows/lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
27+
python-version: ["3.11"]
2828

2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v3
32+
uses: actions/setup-python@v5
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535

.github/workflows/sphinx.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-python@v3
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
1919

2020
- name: Build docs requirements
2121
run: pip install -r docs/requirements.txt

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
32+
python-version: ["3.9", "3.10", "3.11"]
3333

3434
steps:
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3636
- name: Set up Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v3
37+
uses: actions/setup-python@v5
3838
with:
3939
python-version: ${{ matrix.python-version }}
4040

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11.5

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
install:
2-
cd src/ && pip install -e .
2+
cd src/ && pip3 install -e .
33

44
remove:
5-
pip uninstall python_rucaptcha -y
5+
pip3 uninstall python_rucaptcha -y
66

77
refactor:
88
black docs/
@@ -24,11 +24,12 @@ lint:
2424
isort src/ --check-only
2525

2626
upload:
27-
pip install twine
27+
pip3 install twine
2828
cd src/ && python setup.py upload
2929

3030
tests: install
31-
coverage run --rcfile=.coveragerc -m pytest --verbose --showlocals --pastebin=all tests --disable-warnings && \
31+
coverage run --rcfile=.coveragerc -m pytest --verbose --showlocals --pastebin=all \
32+
tests/ --disable-warnings && \
3233
coverage report --precision=3 --sort=cover --skip-empty --show-missing && \
3334
coverage html --precision=3 --skip-empty -d coverage/html/ && \
3435
coverage xml -o coverage/coverage.xml

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# python-rucaptcha
22

33

4-
![](https://github.com/AndreiDrang/python-rucaptcha/blob/master/files/RuCaptcha.png)
4+
![](files/RuCaptchaHigh.png)
55

66
<a href="https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1">
77
<img src="https://cdn.discordapp.com/attachments/1105172394655625306/1105180101802471575/20221207-160749.gif" alt="Capsolver's Banner">
@@ -12,7 +12,7 @@ At the lowest price on the market, you may receive a variety of solutions, inclu
1212

1313
[![PyPI version](https://badge.fury.io/py/python-rucaptcha.svg)](https://badge.fury.io/py/python-rucaptcha)
1414
[![Python versions](https://img.shields.io/pypi/pyversions/python-rucaptcha.svg?logo=python&logoColor=FBE072)](https://badge.fury.io/py/python-rucaptcha)
15-
[![Downloads](https://pepy.tech/badge/python-rucaptcha/month)](https://pepy.tech/project/python-rucaptcha)
15+
[![Downloads](https://static.pepy.tech/badge/python-rucaptcha/month)](https://pepy.tech/project/python-rucaptcha)
1616

1717
[![Maintainability](https://api.codeclimate.com/v1/badges/aec93bb04a277cf0dde9/maintainability)](https://codeclimate.com/github/AndreiDrang/python-rucaptcha/maintainability)
1818
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b4087362bd024b088b358b3e10e7a62f)](https://www.codacy.com/gh/AndreiDrang/python-rucaptcha/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=AndreiDrang/python-rucaptcha&amp;utm_campaign=Badge_Grade)
@@ -63,12 +63,14 @@ Is described in the [documentation-website](https://andreidrang.github.io/python
6363

6464
### Changelog
6565

66+
For full changelog info check - [Releases page](https://github.com/AndreiDrang/python-rucaptcha/releases).
67+
68+
- v.6.0 - Library refactoring. Stop using `pydantic`, start using `msgspec`. Move to API v2. Drop Python 3.8 support. More details at [Releases page](https://github.com/AndreiDrang/python-rucaptcha/releases).
6669
- v.5.3 - Added support for [Death By Captcha](https://www.deathbycaptcha.com?refid=1237267242) and other services by changing `service_type` and `url_request` \ `url_response` parameters.
6770
- v.5.2 - Added Audio captcha method.
6871
- v.5.1 - Check [releases page](https://github.com/AndreiDrang/python-rucaptcha/releases).
6972
- v.5.0 - Added AmazonWAF captcha method.
7073
- v.4.2 - Added [Yandex Smart Captcha](https://rucaptcha.com/api-rucaptcha#yandex).
71-
- v.4.0 - Rework classes and methods. Adding `TikTok` captcha. Adding inheritance and serializers. The `Callback server` is deprecated.
7274

7375
### Get API Key to work with the library
7476
1. On the page - https://rucaptcha.com/enterpage

docs/_static/Captcha300x.png

-281 KB
Binary file not shown.

docs/_static/CaptchaESm.png

-43.6 KB
Binary file not shown.

docs/_static/CaptchaSm.png

-476 KB
Binary file not shown.

docs/_static/RuCaptchaMedium.png

374 KB
Loading

docs/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
key_captcha,
1717
text_captcha,
1818
image_captcha,
19+
lemin_captcha,
1920
rotate_captcha,
20-
yandex_smart_captcha,
21-
lemin_cropped_captcha,
2221
)
2322
from python_rucaptcha.__version__ import __version__
2423

@@ -44,8 +43,8 @@
4443
html_theme = "jinja"
4544
html_theme_options = {"index_sidebar_logo": False}
4645
html_static_path = ["_static"]
47-
html_favicon = "_static/CaptchaESm.png"
48-
html_logo = "_static/CaptchaSm.png"
46+
html_favicon = "_static/RuCaptchaMedium.png"
47+
html_logo = "_static/RuCaptchaMedium.png"
4948
html_title = f"python-rucaptcha ({__version__})"
5049
html_show_sourcelink = False
5150

@@ -61,6 +60,7 @@
6160
"DeathByCaptcha",
6261
"https://deathbycaptcha.com?refid=1237267242",
6362
),
63+
ProjectLink("RedPandaDev group", "https://red-panda-dev.xyz/blog/"),
6464
]
6565
}
6666
html_sidebars = {

docs/index.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
python-rucaptcha
44
================
5-
.. image:: _static/Captcha300x.png
5+
.. image:: _static/RuCaptchaMedium.png
66
:align: center
77

88
Python3 library for `RuCaptcha <https://rucaptcha.com/?from=4170435>`_ and `2Captcha <https://2captcha.com/?from=4170435>`_ service API.
@@ -11,6 +11,8 @@ The library is intended for software developers and is used to work with the `Ru
1111

1212
Support of the service `Death By Captcha <https://deathbycaptcha.com?refid=1237267242>`_ is integrated into this library, more information in the library documentation or in the `service docs <https://deathbycaptcha.com/api/2captcha?refid=1237267242>`_.
1313

14+
Check our other projects here - `RedPandaDev group <https://red-panda-dev.xyz/blog/>`_. For example - `Torrents Tracker bot <https://t.me/torrents_tracker_bot>`_ for Telegram
15+
1416
.. toctree::
1517
:maxdepth: 1
1618
:caption: Start here:
@@ -36,7 +38,6 @@ Support of the service `Death By Captcha <https://deathbycaptcha.com?refid=12372
3638
modules/rotate/example.rst
3739
modules/text/example.rst
3840
modules/turnstile/example.rst
39-
modules/yandex/example.rst
4041
modules/image/example.rst
4142
modules/audio/example.rst
4243
modules/control/example.rst

docs/modules/enum/info.rst

+1-9
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To import this module:
4040
:members:
4141
:undoc-members:
4242

43-
.. autoclass:: python_rucaptcha.core.enums.LeminCroppedCaptchaEnm
43+
.. autoclass:: python_rucaptcha.core.enums.LeminCaptchaEnm
4444
:members:
4545
:undoc-members:
4646

@@ -56,18 +56,10 @@ To import this module:
5656
:members:
5757
:undoc-members:
5858

59-
.. autoclass:: python_rucaptcha.core.enums.TikTokCaptchaEnm
60-
:members:
61-
:undoc-members:
62-
6359
.. autoclass:: python_rucaptcha.core.enums.ControlEnm
6460
:members:
6561
:undoc-members:
6662

67-
.. autoclass:: python_rucaptcha.core.enums.YandexSmartCaptchaEnm
68-
:members:
69-
:undoc-members:
70-
7163
.. autoclass:: python_rucaptcha.core.enums.TurnstileCaptchaEnm
7264
:members:
7365
:undoc-members:

docs/modules/lemin/example.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
LeminCroppedCaptcha
2-
===================
1+
LeminCaptcha
2+
============
33

44
To import this module:
55

66
.. code-block:: python
77
8-
from python_rucaptcha.lemin_cropped_captcha import LeminCroppedCaptcha
8+
from python_rucaptcha.lemin_captcha import LeminCaptcha
99
1010
11-
.. autoclass:: python_rucaptcha.lemin_cropped_captcha.LeminCroppedCaptcha
11+
.. autoclass:: python_rucaptcha.lemin_captcha.LeminCaptcha
1212
:members:

docs/modules/main/info.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Introduction
22

33

4-
![](../../_static/CaptchaSm.png)
4+
![](../../_static/RuCaptchaMedium.png)
55

66
<a href="https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1">
77
<img src="https://cdn.discordapp.com/attachments/1105172394655625306/1105180101802471575/20221207-160749.gif" alt="Capsolver's Banner">

docs/modules/other-libs/info.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
1. [RuCaptcha / 2Captcha](https://github.com/AndreiDrang/python-rucaptcha)
55
2. [AntiCaptcha](https://github.com/AndreiDrang/python3-anticaptcha)
66
3. [Capsolver](https://github.com/AndreiDrang/python3-captchaai)
7+
8+
Our other projects:
9+
- [RedPandaDev group](https://red-panda-dev.xyz/blog/)

docs/modules/serializer/info.rst

+1-27
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,6 @@ To import this module:
88
from python_rucaptcha.core import serializer
99
1010
11-
.. autopydantic_model:: python_rucaptcha.core.serializer.ResponseSer
11+
.. autoclass:: python_rucaptcha.core.serializer.GetTaskResultResponseSer
1212
:members:
1313
:undoc-members:
14-
15-
16-
.. autopydantic_model:: python_rucaptcha.core.serializer.PostRequestSer
17-
:members:
18-
:undoc-members:
19-
20-
21-
.. autopydantic_model:: python_rucaptcha.core.serializer.GetRequestSer
22-
:members:
23-
:undoc-members:
24-
25-
26-
.. autopydantic_model:: python_rucaptcha.core.serializer.CaptchaOptionsSer
27-
:members:
28-
:undoc-members:
29-
30-
31-
.. autopydantic_model:: python_rucaptcha.core.serializer.ServicePostResponseSer
32-
:members:
33-
:undoc-members:
34-
35-
36-
.. autopydantic_model:: python_rucaptcha.core.serializer.ServiceGetResponseSer
37-
:members:
38-
:undoc-members:
39-

docs/modules/yandex/example.rst

-12
This file was deleted.

docs/requirements.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
pallets_sphinx_themes==2.*
2-
myst-parser==1.0.*
3-
autodoc_pydantic==1.8.*
1+
sphinx==7.2.6
2+
pallets_sphinx_themes==2.1.1
3+
myst-parser==2.0.0
4+
autodoc_pydantic==2.0.1
5+
pydantic==2.4.2
6+
pydantic-settings==2.0.3

files/RuCaptcha.png

-476 KB
Binary file not shown.

files/RuCaptchaHigh.png

963 KB
Loading

files/RuCaptchaLow.png

-34.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)