Skip to content

Commit 4c6ef43

Browse files
author
Andrei D
committed
Update anticaptcha_nocaptcha_example.py
1 parent 430c49c commit 4c6ef43

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

anticaptcha_examples/anticaptcha_nocaptcha_example.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55

66
ANTICAPTCHA_KEY = "ae23fffcfaa29b170e3843e3a486ef19"
77

8-
# Пример показывает работу антикапчи с "невидимой" рекапчёй от гугла, точно так же работает обычная рекапча от гугла.
9-
# Это метод для работы без прокси
8+
9+
"""
10+
Синхронный пример без прокси
11+
Sync example without proxy
12+
"""
1013
result = NoCaptchaTaskProxyless.NoCaptchaTaskProxyless(
1114
anticaptcha_key=ANTICAPTCHA_KEY
1215
).captcha_handler(
@@ -15,16 +18,21 @@
1518
)
1619
print(result)
1720

18-
# contextmanager
21+
"""
22+
Синхронный пример с контекстным менеджером и без прокси
23+
Sync example with contextmanager and without proxy
24+
"""
1925
with NoCaptchaTaskProxyless.NoCaptchaTaskProxyless(anticaptcha_key=ANTICAPTCHA_KEY) as nocaptcha:
2026
response = nocaptcha.captcha_handler(
2127
websiteURL="https://www.google.com/recaptcha/api2/demo",
2228
websiteKey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
2329
)
2430
print(response)
2531

26-
27-
# Пример работы антикапчи с гугловской невидимой рекапчёй и обычной рекапчёй с использованием ПРОКСИ
32+
"""
33+
Синхронный пример с прокси
34+
Sync example with proxy
35+
"""
2836
result = NoCaptchaTask.NoCaptchaTask(
2937
anticaptcha_key=ANTICAPTCHA_KEY,
3038
proxyType="http",
@@ -39,7 +47,10 @@
3947

4048
print(result)
4149

42-
# Асинхронный пример
50+
"""
51+
Асинхронный пример без прокси
52+
Async example without proxy
53+
"""
4354
async def run():
4455
try:
4556
result = await NoCaptchaTaskProxyless.aioNoCaptchaTaskProxyless(

0 commit comments

Comments
 (0)