From 532e12289d15fae805555882733b6aa5a3f9fff3 Mon Sep 17 00:00:00 2001 From: Andrei D Date: Mon, 15 Jun 2020 04:00:35 +0300 Subject: [PATCH] Update website domain --- README.md | 6 +++--- .../anticaptcah_image_to_text_example.py | 14 +++++++------- anticaptcha_examples/anticaptcha_fun_example.py | 6 +++--- .../anticaptcha_hcaptcha_example.py | 6 +++--- .../anticaptcha_nocaptcha_example.py | 4 ++-- .../anticaptcha_square_net_task.py | 4 ++-- anticaptcha_examples/callback_examples.py | 10 +++++----- tests/main.py | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1f8b7b7..5024153 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ from python3_anticaptcha import ImageToTextTask # Enter the key to the AntiCaptcha service from your account. Anticaptcha service key. ANTICAPTCHA_KEY = "" # Ссылка на изображения для расшифровки. Link to captcha image. -image_link = "https://pythoncaptcha.cloud/static/image/common_image_example/800070.png" +image_link = "https://pythoncaptcha.tech/static/image/common_image_example/800070.png" # Возвращается строка-расшифровка капчи. Get string for solve captcha, and some other info. user_answer = ImageToTextTask.ImageToTextTask(anticaptcha_key = ANTICAPTCHA_KEY).\ captcha_handler(captcha_link=image_link) @@ -211,9 +211,9 @@ result = HCaptchaTaskProxyless.HCaptchaTaskProxyless(anticaptcha_key=ANTICAPTCHA print(result) ``` *** -Кроме того, для тестирования различных типов капчи предоставляется [специальный сайт](https://pythoncaptcha.cloud/), на котором собраны все имеющиеся типы капчи, с удобной системой тестирования ваших скриптов. +Кроме того, для тестирования различных типов капчи предоставляется [специальный сайт](https://pythoncaptcha.tech/), на котором собраны все имеющиеся типы капчи, с удобной системой тестирования ваших скриптов. -Some examples you can test with our [web-site](https://pythoncaptcha.cloud/). +Some examples you can test with our [web-site](https://pythoncaptcha.tech/). *** #### For tests: diff --git a/anticaptcha_examples/anticaptcah_image_to_text_example.py b/anticaptcha_examples/anticaptcah_image_to_text_example.py index aa2e52a..524b622 100644 --- a/anticaptcha_examples/anticaptcah_image_to_text_example.py +++ b/anticaptcha_examples/anticaptcah_image_to_text_example.py @@ -26,7 +26,7 @@ save_format = 'const' . result = ImageToTextTask.ImageToTextTask( anticaptcha_key=ANTICAPTCHA_KEY, save_format="const" ).captcha_handler( - captcha_link="https://pythoncaptcha.cloud/static/image/common_image_example/800070.png" + captcha_link="https://pythoncaptcha.tech/static/image/common_image_example/800070.png" ) print(result) @@ -34,7 +34,7 @@ print(result) # Протестировано на Линуксах. Не используйте данный вариант на Windows! Возможно починим, но потом. # Example for working with captcha-image like a temporary file. Tested on UNIX-based systems. Don`t use it on Windows! result = ImageToTextTask.ImageToTextTask(anticaptcha_key=ANTICAPTCHA_KEY).captcha_handler( - captcha_link="https://pythoncaptcha.cloud/static/image/common_image_example/800070.png" + captcha_link="https://pythoncaptcha.tech/static/image/common_image_example/800070.png" ) print(result) @@ -46,7 +46,7 @@ An example of working with decoding in base64 captcha-file after download. On-th """ base_64_link = base64.b64encode( requests.get( - "https://pythoncaptcha.cloud/static/image/common_image_example/862963.png" + "https://pythoncaptcha.tech/static/image/common_image_example/862963.png" ).content ).decode("utf-8") @@ -107,7 +107,7 @@ async def run(): resolve = await ImageToTextTask.aioImageToTextTask( anticaptcha_key=ANTICAPTCHA_KEY, save_format="const" ).captcha_handler( - captcha_link="https://pythoncaptcha.cloud/static/image/common_image_example/800070.png" + captcha_link="https://pythoncaptcha.tech/static/image/common_image_example/800070.png" ) print(resolve) @@ -148,7 +148,7 @@ QUEUE_KEY = "wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ_anticaptcha_queue" """ answer = requests.post( - "https://pythoncaptcha.cloud:8001/register_key", + "https://pythoncaptcha.tech:8001/register_key", json={"key": QUEUE_KEY, "vhost": "anticaptcha_vhost"}, ) # если очередь успешно создана: @@ -157,9 +157,9 @@ if answer == "OK": # создаём задание с callbackURL параметром result = ImageToTextTask.ImageToTextTask( anticaptcha_key=ANTICAPTCHA_KEY, - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/image_to_text/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/image_to_text/{QUEUE_KEY}", ).captcha_handler( - captcha_link="https://pythoncaptcha.cloud/static/image/common_image_example/800070.png" + captcha_link="https://pythoncaptcha.tech/static/image/common_image_example/800070.png" ) print(result) diff --git a/anticaptcha_examples/anticaptcha_fun_example.py b/anticaptcha_examples/anticaptcha_fun_example.py index 815e9cd..c607de5 100644 --- a/anticaptcha_examples/anticaptcha_fun_example.py +++ b/anticaptcha_examples/anticaptcha_fun_example.py @@ -70,7 +70,7 @@ QUEUE_KEY = "wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ_anticaptcha_queue" """ answer = requests.post( - "https://pythoncaptcha.cloud:8001/register_key", + "https://pythoncaptcha.tech:8001/register_key", json={"key": QUEUE_KEY, "vhost": "anticaptcha_vhost"}, ) # если очередь успешно создана: @@ -84,7 +84,7 @@ if answer == "OK": proxyPort=8080, proxyLogin="proxyLoginHere", proxyPassword="proxyPasswordHere", - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", ).captcha_handler(websiteURL=WEB_URL, websitePublicKey=SITE_KEY) print(result) @@ -100,7 +100,7 @@ if answer == "OK": # создаём задание с callbackURL параметром result = FunCaptchaTaskProxyless.FunCaptchaTaskProxyless( anticaptcha_key=ANTICAPTCHA_KEY, - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", ).captcha_handler(websiteURL=WEB_URL, websitePublicKey=SITE_KEY) print(result) diff --git a/anticaptcha_examples/anticaptcha_hcaptcha_example.py b/anticaptcha_examples/anticaptcha_hcaptcha_example.py index 22238d0..4edc41e 100644 --- a/anticaptcha_examples/anticaptcha_hcaptcha_example.py +++ b/anticaptcha_examples/anticaptcha_hcaptcha_example.py @@ -72,7 +72,7 @@ QUEUE_KEY = "wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ_anticaptcha_queue" """ answer = requests.post( - "https://pythoncaptcha.cloud:8001/register_key", + "https://pythoncaptcha.tech:8001/register_key", json={"key": QUEUE_KEY, "vhost": "anticaptcha_vhost"}, ) # если очередь успешно создана: @@ -87,7 +87,7 @@ if answer == "OK": proxyLogin="proxyLoginHere", proxyPassword="proxyPasswordHere", userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36", - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", ).captcha_handler(websiteURL=WEB_URL, websiteKey=SITE_KEY) print(result) @@ -103,7 +103,7 @@ if answer == "OK": # создаём задание с callbackURL параметром result = HCaptchaTaskProxyless.HCaptchaTaskProxyless( anticaptcha_key=ANTICAPTCHA_KEY, - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", ).captcha_handler(websiteURL=WEB_URL, websiteKey=SITE_KEY) print(result) diff --git a/anticaptcha_examples/anticaptcha_nocaptcha_example.py b/anticaptcha_examples/anticaptcha_nocaptcha_example.py index 1aa08f6..0c6de9c 100644 --- a/anticaptcha_examples/anticaptcha_nocaptcha_example.py +++ b/anticaptcha_examples/anticaptcha_nocaptcha_example.py @@ -84,7 +84,7 @@ QUEUE_KEY = "wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ_anticaptcha_queue" """ answer = requests.post( - "https://pythoncaptcha.cloud:8001/register_key", + "https://pythoncaptcha.tech:8001/register_key", json={"key": QUEUE_KEY, "vhost": "anticaptcha_vhost"}, ) # если очередь успешно создана: @@ -97,7 +97,7 @@ if answer == "OK": proxyPort=8080, proxyLogin="proxyLoginHere", proxyPassword="proxyPasswordHere", - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/nocaptcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/nocaptcha/{QUEUE_KEY}", ).captcha_handler( websiteURL="https://www.google.com/recaptcha/api2/demo", websiteKey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", diff --git a/anticaptcha_examples/anticaptcha_square_net_task.py b/anticaptcha_examples/anticaptcha_square_net_task.py index 37c4e7a..33ad87d 100644 --- a/anticaptcha_examples/anticaptcha_square_net_task.py +++ b/anticaptcha_examples/anticaptcha_square_net_task.py @@ -57,7 +57,7 @@ QUEUE_KEY = "wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ_anticaptcha_queue" """ answer = requests.post( - "https://pythoncaptcha.cloud:8001/register_key", + "https://pythoncaptcha.tech:8001/register_key", json={"key": QUEUE_KEY, "vhost": "anticaptcha_vhost"}, ) # если очередь успешно создана: @@ -65,7 +65,7 @@ if answer == "OK": # создаём задание с callbackURL параметром result = SquareNetTextTask.SquareNetTextTask( anticaptcha_key=ANTICAPTCHA_KEY, - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/fun_captcha/{QUEUE_KEY}", ).captcha_handler( objectName="captcha numbers", rowsCount=2, diff --git a/anticaptcha_examples/callback_examples.py b/anticaptcha_examples/callback_examples.py index f7917df..eb83156 100644 --- a/anticaptcha_examples/callback_examples.py +++ b/anticaptcha_examples/callback_examples.py @@ -27,7 +27,7 @@ QUEUE_KEY = "wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ_anticaptcha_queue" """ answer = requests.post( - "https://pythoncaptcha.cloud:8001/register_key", + "https://pythoncaptcha.tech:8001/register_key", json={"key": QUEUE_KEY, "vhost": "anticaptcha_vhost"}, ) # если очередь успешно создана: @@ -37,7 +37,7 @@ if answer == "OK": # Это метод для работы без прокси result = NoCaptchaTaskProxyless.NoCaptchaTaskProxyless( anticaptcha_key=ANTICAPTCHA_KEY, - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/nocaptcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/nocaptcha/{QUEUE_KEY}", ).captcha_handler( websiteURL="https://www.google.com/recaptcha/api2/demo", websiteKey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", @@ -53,11 +53,11 @@ if answer == "OK": ).captcha_handler( requests_timeout=0.5, auth_params={ - "host": "https://pythoncaptcha.cloud/", + "host": "https://pythoncaptcha.tech/", "port": "8001", "rtmq_username": "hardworker_1", "rtmq_password": "password", - "rtmq_host": "https://pythoncaptcha.cloud/", + "rtmq_host": "https://pythoncaptcha.tech/", "rtmq_port": "5672", "rtmq_vhost": "anticaptcha_vhost", }, @@ -69,7 +69,7 @@ if answer == "OK": try: result = await NoCaptchaTaskProxyless.aioNoCaptchaTaskProxyless( anticaptcha_key=ANTICAPTCHA_KEY, - callbackUrl=f"https://pythoncaptcha.cloud:8001/anticaptcha/nocaptcha/{QUEUE_KEY}", + callbackUrl=f"https://pythoncaptcha.tech:8001/anticaptcha/nocaptcha/{QUEUE_KEY}", ).captcha_handler( websiteURL="https://www.google.com/recaptcha/api2/demo", websiteKey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", diff --git a/tests/main.py b/tests/main.py index 9b3d384..108bb7d 100644 --- a/tests/main.py +++ b/tests/main.py @@ -10,7 +10,7 @@ class MainAntiCaptcha(object): self.anticaptcha_key_fail = os.getenv("anticaptcha_key")[:5] self.anticaptcha_key_true = os.getenv("anticaptcha_key") self.server_ip = "85.255.8.26" - self.host = "https://pythoncaptcha.cloud" + self.host = "https://pythoncaptcha.tech" self.image_url = self.host + "/static/image/common_image_example/620626.png" self.ERROR_RESPONSE_JSON = {