diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 974b25c..d7ba37f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -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 }}" diff --git a/examples/async_balance.py b/examples/async_balance.py index 49d1d85..ad072b1 100644 --- a/examples/async_balance.py +++ b/examples/async_balance.py @@ -4,7 +4,7 @@ from python_anticaptcha import AsyncAnticaptchaClient -api_key = environ["KEY"] +api_key = environ["ANTICAPTCHA_API_KEY"] async def process(): diff --git a/examples/async_recaptcha_request.py b/examples/async_recaptcha_request.py index b3dcaa1..af955ef 100644 --- a/examples/async_recaptcha_request.py +++ b/examples/async_recaptcha_request.py @@ -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!" diff --git a/examples/sync_antigate.py b/examples/sync_antigate.py index 5c90b60..88d3714 100644 --- a/examples/sync_antigate.py +++ b/examples/sync_antigate.py @@ -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" diff --git a/examples/sync_app_stat.py b/examples/sync_app_stat.py index 8edc3d6..fb11ce2 100644 --- a/examples/sync_app_stat.py +++ b/examples/sync_app_stat.py @@ -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] diff --git a/examples/sync_balance.py b/examples/sync_balance.py index 297e298..e097f59 100644 --- a/examples/sync_balance.py +++ b/examples/sync_balance.py @@ -3,7 +3,7 @@ from python_anticaptcha import AnticaptchaClient -api_key = environ["KEY"] +api_key = environ["ANTICAPTCHA_API_KEY"] def process(): diff --git a/examples/sync_funcaptcha_request.py b/examples/sync_funcaptcha_request.py index 4ebf2b9..fa554e1 100644 --- a/examples/sync_funcaptcha_request.py +++ b/examples/sync_funcaptcha_request.py @@ -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: "(.+?)",' diff --git a/examples/sync_funcaptcha_selenium.py b/examples/sync_funcaptcha_selenium.py index 606e827..b1d4e26 100644 --- a/examples/sync_funcaptcha_selenium.py +++ b/examples/sync_funcaptcha_selenium.py @@ -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) diff --git a/examples/sync_funcaptcha_selenium_callback.py b/examples/sync_funcaptcha_selenium_callback.py index a347d18..e289d5a 100644 --- a/examples/sync_funcaptcha_selenium_callback.py +++ b/examples/sync_funcaptcha_selenium_callback.py @@ -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!" diff --git a/examples/sync_hcaptcha_request.py b/examples/sync_hcaptcha_request.py index df94fdc..ef0c18d 100644 --- a/examples/sync_hcaptcha_request.py +++ b/examples/sync_hcaptcha_request.py @@ -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) diff --git a/examples/sync_hcaptcha_request_proxy.py b/examples/sync_hcaptcha_request_proxy.py index 168146e..2e728cb 100644 --- a/examples/sync_hcaptcha_request_proxy.py +++ b/examples/sync_hcaptcha_request_proxy.py @@ -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/" diff --git a/examples/sync_recaptcha3_request.py b/examples/sync_recaptcha3_request.py index a06cac4..a575f21 100644 --- a/examples/sync_recaptcha3_request.py +++ b/examples/sync_recaptcha3_request.py @@ -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" diff --git a/examples/sync_recaptcha_request.py b/examples/sync_recaptcha_request.py index 9b917b1..1d7eb0c 100644 --- a/examples/sync_recaptcha_request.py +++ b/examples/sync_recaptcha_request.py @@ -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!" diff --git a/examples/sync_recaptcha_selenium.py b/examples/sync_recaptcha_selenium.py index dc46a6d..5fa3be7 100644 --- a/examples/sync_recaptcha_selenium.py +++ b/examples/sync_recaptcha_selenium.py @@ -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!" diff --git a/examples/sync_recaptcha_selenium_callback.py b/examples/sync_recaptcha_selenium_callback.py index 6004ca3..0cd0988 100644 --- a/examples/sync_recaptcha_selenium_callback.py +++ b/examples/sync_recaptcha_selenium_callback.py @@ -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,' diff --git a/examples/sync_remote_image.py b/examples/sync_remote_image.py index feb38d5..bcc77a2 100644 --- a/examples/sync_remote_image.py +++ b/examples/sync_remote_image.py @@ -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" diff --git a/examples/sync_text.py b/examples/sync_text.py index 18c14e2..0d152bf 100644 --- a/examples/sync_text.py +++ b/examples/sync_text.py @@ -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" diff --git a/examples/sync_text_stream.py b/examples/sync_text_stream.py index a8c133f..4b4f5a7 100644 --- a/examples/sync_text_stream.py +++ b/examples/sync_text_stream.py @@ -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" diff --git a/tests/test_examples.py b/tests/test_examples.py index 5bd8054..ff382b6 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -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)