Update website domain
This commit is contained in:
parent
e02e0701c6
commit
532e12289d
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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-",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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-",
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue