Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
- name: Run integration tests
run: make test_e2e
env:
KEY: ${{ secrets.anticaptcha_key }}
ANTICAPTCHA_API_KEY: ${{ secrets.anticaptcha_key }}
PROXY_URL: "${{ secrets.proxy_url }}"
2 changes: 1 addition & 1 deletion examples/async_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from python_anticaptcha import AsyncAnticaptchaClient

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]


async def process():
Expand Down
2 changes: 1 addition & 1 deletion examples/async_recaptcha_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from python_anticaptcha import AsyncAnticaptchaClient, NoCaptchaTaskProxylessTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = 'data-sitekey="(.+?)"'
url = "https://www.google.com/recaptcha/api2/demo?invisible=false"
EXPECTED_RESULT = "Verification Success... Hooray!"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_antigate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from python_anticaptcha import AnticaptchaClient
from python_anticaptcha.tasks import AntiGateTaskProxyless

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]

URL = "https://anti-captcha.com/tutorials/v2-textarea"

Expand Down
2 changes: 1 addition & 1 deletion examples/sync_app_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from python_anticaptcha import AnticaptchaClient

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]

soft_id = argv[1]
mode = argv[2]
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from python_anticaptcha import AnticaptchaClient

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]


def process():
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_funcaptcha_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from python_anticaptcha import AnticaptchaClient, FunCaptchaTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = 'public_key: "(.+?)",'
site_key_pattern = 'public_key: "(.+?)",'
surl_pattern = 'surl: "(.+?)",'
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_funcaptcha_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from python_anticaptcha import AnticaptchaClient, FunCaptchaTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = 'public_key: "(.+?)",'
url = "https://client-demo.arkoselabs.com/solo-animals"
client = AnticaptchaClient(api_key)
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_funcaptcha_selenium_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from python_anticaptcha import AnticaptchaClient, FunCaptchaProxylessTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = 'public_key: "(.+?)",'
url = "https://client-demo.arkoselabs.com/solo-animals"
EXPECTED_RESULT = "Solved!"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_hcaptcha_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from python_anticaptcha import AnticaptchaClient, HCaptchaTaskProxyless

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = 'data-sitekey="(.+?)"'
url = "http://hcaptcha.jawne.info.pl/"
client = AnticaptchaClient(api_key)
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_hcaptcha_request_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from python_anticaptcha import AnticaptchaClient, HCaptchaTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
proxy_url = environ["PROXY_URL"] # eg. socks5://user:password/123.123.123.123:8888/
site_key_pattern = 'data-sitekey="(.+?)"'
url = "http://hcaptcha.jawne.info.pl/"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_recaptcha3_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from python_anticaptcha import AnticaptchaClient, RecaptchaV3TaskProxyless

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = r"grecaptcha.execute\('(.+?)'"
action_name_pattern = r"\{action: '(.+?)'\}"
url = "https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_recaptcha_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from python_anticaptcha import AnticaptchaClient, NoCaptchaTaskProxylessTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = 'data-sitekey="(.+?)"'
url = "https://www.google.com/recaptcha/api2/demo?invisible=false"
EXPECTED_RESULT = "Verification Success... Hooray!"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_recaptcha_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from python_anticaptcha import AnticaptchaClient, NoCaptchaTaskProxylessTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
invisible_captcha = True
url = f"https://www.google.com/recaptcha/api2/demo?invisible={str(invisible_captcha)}"
EXPECTED_RESULT = "Verification Success... Hooray!"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_recaptcha_selenium_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from python_anticaptcha import AnticaptchaClient, NoCaptchaTaskProxylessTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
site_key_pattern = "'sitekey': '(.+?)'"
url = "http://hcaptcha.jawne.info.pl/recaptcha.php"
EXPECTED_RESULT = '"success": true,'
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_remote_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from python_anticaptcha import AnticaptchaClient, ImageToTextTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]

URL = "https://raw.githubusercontent.com/ad-m/python-anticaptcha/master/examples/captcha_ms.jpeg"
EXPECTED_RESULT = "56nn2"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from python_anticaptcha import AnticaptchaClient, ImageToTextTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]

IMAGE = "examples/captcha_ms.jpeg"
EXPECTED_RESULT = "56nn2"
Expand Down
2 changes: 1 addition & 1 deletion examples/sync_text_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from python_anticaptcha import AnticaptchaClient, ImageToTextTask

api_key = environ["KEY"]
api_key = environ["ANTICAPTCHA_API_KEY"]
DIR = os.path.dirname(os.path.abspath(__file__))
IMAGE = f"{DIR}/captcha_ms.jpeg"
EXPECTED_RESULT = "56nn2"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

def missing_key(*args, **kwargs):
return skipIf(
"KEY" not in os.environ,
"Missing KEY environment variable. Unable to connect Anti-captcha.com",
"ANTICAPTCHA_API_KEY" not in os.environ,
"Missing ANTICAPTCHA_API_KEY environment variable. Unable to connect Anti-captcha.com",
)(*args, **kwargs)


Expand Down
Loading