Skip to content

Commit

Permalink
Merge pull request #170 from AndreiDrang/master
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang authored Dec 8, 2023
2 parents ce0f2b1 + eda564e commit e4fae1e
Show file tree
Hide file tree
Showing 84 changed files with 3,060 additions and 4,453 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "[github-actions] "
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

- name: Build docs requirements
run: pip install -r docs/requirements.txt
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.5
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
install:
cd src/ && pip install -e .
cd src/ && pip3 install -e .

remove:
pip uninstall python_rucaptcha -y
pip3 uninstall python_rucaptcha -y

refactor:
black docs/
Expand All @@ -24,11 +24,12 @@ lint:
isort src/ --check-only

upload:
pip install twine
pip3 install twine
cd src/ && python setup.py upload

tests: install
coverage run --rcfile=.coveragerc -m pytest --verbose --showlocals --pastebin=all tests --disable-warnings && \
coverage run --rcfile=.coveragerc -m pytest --verbose --showlocals --pastebin=all \
tests/ --disable-warnings && \
coverage report --precision=3 --sort=cover --skip-empty --show-missing && \
coverage html --precision=3 --skip-empty -d coverage/html/ && \
coverage xml -o coverage/coverage.xml
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# python-rucaptcha


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

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

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

[![Maintainability](https://api.codeclimate.com/v1/badges/aec93bb04a277cf0dde9/maintainability)](https://codeclimate.com/github/AndreiDrang/python-rucaptcha/maintainability)
[![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)
Expand Down Expand Up @@ -63,12 +63,14 @@ Is described in the [documentation-website](https://andreidrang.github.io/python

### Changelog

For full changelog info check - [Releases page](https://github.com/AndreiDrang/python-rucaptcha/releases).

- 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).
- 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.
- v.5.2 - Added Audio captcha method.
- v.5.1 - Check [releases page](https://github.com/AndreiDrang/python-rucaptcha/releases).
- v.5.0 - Added AmazonWAF captcha method.
- v.4.2 - Added [Yandex Smart Captcha](https://rucaptcha.com/api-rucaptcha#yandex).
- v.4.0 - Rework classes and methods. Adding `TikTok` captcha. Adding inheritance and serializers. The `Callback server` is deprecated.

### Get API Key to work with the library
1. On the page - https://rucaptcha.com/enterpage
Expand Down
Binary file removed docs/_static/Captcha300x.png
Binary file not shown.
Binary file removed docs/_static/CaptchaESm.png
Binary file not shown.
Binary file removed docs/_static/CaptchaSm.png
Binary file not shown.
Binary file added docs/_static/RuCaptchaMedium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
key_captcha,
text_captcha,
image_captcha,
lemin_captcha,
rotate_captcha,
yandex_smart_captcha,
lemin_cropped_captcha,
)
from python_rucaptcha.__version__ import __version__

Expand All @@ -44,8 +43,8 @@
html_theme = "jinja"
html_theme_options = {"index_sidebar_logo": False}
html_static_path = ["_static"]
html_favicon = "_static/CaptchaESm.png"
html_logo = "_static/CaptchaSm.png"
html_favicon = "_static/RuCaptchaMedium.png"
html_logo = "_static/RuCaptchaMedium.png"
html_title = f"python-rucaptcha ({__version__})"
html_show_sourcelink = False

Expand All @@ -61,6 +60,7 @@
"DeathByCaptcha",
"https://deathbycaptcha.com?refid=1237267242",
),
ProjectLink("RedPandaDev group", "https://red-panda-dev.xyz/blog/"),
]
}
html_sidebars = {
Expand Down
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

python-rucaptcha
================
.. image:: _static/Captcha300x.png
.. image:: _static/RuCaptchaMedium.png
:align: center

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

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>`_.

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

.. toctree::
:maxdepth: 1
:caption: Start here:
Expand All @@ -36,7 +38,6 @@ Support of the service `Death By Captcha <https://deathbycaptcha.com?refid=12372
modules/rotate/example.rst
modules/text/example.rst
modules/turnstile/example.rst
modules/yandex/example.rst
modules/image/example.rst
modules/audio/example.rst
modules/control/example.rst
Expand Down
10 changes: 1 addition & 9 deletions docs/modules/enum/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To import this module:
:members:
:undoc-members:

.. autoclass:: python_rucaptcha.core.enums.LeminCroppedCaptchaEnm
.. autoclass:: python_rucaptcha.core.enums.LeminCaptchaEnm
:members:
:undoc-members:

Expand All @@ -56,18 +56,10 @@ To import this module:
:members:
:undoc-members:

.. autoclass:: python_rucaptcha.core.enums.TikTokCaptchaEnm
:members:
:undoc-members:

.. autoclass:: python_rucaptcha.core.enums.ControlEnm
:members:
:undoc-members:

.. autoclass:: python_rucaptcha.core.enums.YandexSmartCaptchaEnm
:members:
:undoc-members:

.. autoclass:: python_rucaptcha.core.enums.TurnstileCaptchaEnm
:members:
:undoc-members:
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/lemin/example.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
LeminCroppedCaptcha
===================
LeminCaptcha
============

To import this module:

.. code-block:: python
from python_rucaptcha.lemin_cropped_captcha import LeminCroppedCaptcha
from python_rucaptcha.lemin_captcha import LeminCaptcha
.. autoclass:: python_rucaptcha.lemin_cropped_captcha.LeminCroppedCaptcha
.. autoclass:: python_rucaptcha.lemin_captcha.LeminCaptcha
:members:
2 changes: 1 addition & 1 deletion docs/modules/main/info.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Introduction


![](../../_static/CaptchaSm.png)
![](../../_static/RuCaptchaMedium.png)

<a href="https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1">
<img src="https://cdn.discordapp.com/attachments/1105172394655625306/1105180101802471575/20221207-160749.gif" alt="Capsolver's Banner">
Expand Down
3 changes: 3 additions & 0 deletions docs/modules/other-libs/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
1. [RuCaptcha / 2Captcha](https://github.com/AndreiDrang/python-rucaptcha)
2. [AntiCaptcha](https://github.com/AndreiDrang/python3-anticaptcha)
3. [Capsolver](https://github.com/AndreiDrang/python3-captchaai)

Our other projects:
- [RedPandaDev group](https://red-panda-dev.xyz/blog/)
28 changes: 1 addition & 27 deletions docs/modules/serializer/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,6 @@ To import this module:
from python_rucaptcha.core import serializer
.. autopydantic_model:: python_rucaptcha.core.serializer.ResponseSer
.. autoclass:: python_rucaptcha.core.serializer.GetTaskResultResponseSer
:members:
:undoc-members:


.. autopydantic_model:: python_rucaptcha.core.serializer.PostRequestSer
:members:
:undoc-members:


.. autopydantic_model:: python_rucaptcha.core.serializer.GetRequestSer
:members:
:undoc-members:


.. autopydantic_model:: python_rucaptcha.core.serializer.CaptchaOptionsSer
:members:
:undoc-members:


.. autopydantic_model:: python_rucaptcha.core.serializer.ServicePostResponseSer
:members:
:undoc-members:


.. autopydantic_model:: python_rucaptcha.core.serializer.ServiceGetResponseSer
:members:
:undoc-members:

12 changes: 0 additions & 12 deletions docs/modules/yandex/example.rst

This file was deleted.

9 changes: 6 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pallets_sphinx_themes==2.*
myst-parser==1.0.*
autodoc_pydantic==1.8.*
sphinx==7.2.6
pallets_sphinx_themes==2.1.1
myst-parser==2.0.0
autodoc_pydantic==2.0.1
pydantic==2.4.2
pydantic-settings==2.0.3
Binary file removed files/RuCaptcha.png
Binary file not shown.
Binary file added files/RuCaptchaHigh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed files/RuCaptchaLow.png
Binary file not shown.
Loading

0 comments on commit e4fae1e

Please sign in to comment.