Update config.py
This commit is contained in:
parent
286f2ea64a
commit
2585b97bdb
|
@ -1,4 +1,5 @@
|
|||
import urllib3
|
||||
from typing import Generator
|
||||
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
|
@ -8,3 +9,18 @@ create_task_url = "https://api.anti-captcha.com/createTask"
|
|||
get_result_url = "https://api.anti-captcha.com/getTaskResult"
|
||||
# ключ приложения
|
||||
app_key = "867"
|
||||
|
||||
|
||||
# Connection retry generator
|
||||
def attempts_generator(amount: int = 5) -> Generator:
|
||||
"""
|
||||
Function generates a generator of length equal to `amount`
|
||||
|
||||
Args:
|
||||
amount: number of attempts generated
|
||||
|
||||
Returns:
|
||||
Attempt number
|
||||
"""
|
||||
for i in range(1, amount):
|
||||
yield i
|
||||
|
|
Loading…
Reference in New Issue