DooD Stream, Fix Kodi 18

This commit is contained in:
Alhaziel01
2021-06-01 09:18:58 +02:00
parent e7038d0e58
commit abf92a832f
8 changed files with 30 additions and 30 deletions

View File

@@ -103,7 +103,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.get(
f'{self.host}/res.php',
'{}/res.php'.format(self.host),
params={
'key': self.api_key,
'action': 'reportbad',
@@ -138,7 +138,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.get(
f'{self.host}/res.php',
'{}/res.php'.format(self.host),
params={
'key': self.api_key,
'action': 'get',
@@ -195,7 +195,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.post(
f'{self.host}/in.php',
'{}/in.php'.format(self.host),
data=data,
allow_redirects=False,
timeout=30

View File

@@ -36,7 +36,7 @@ class captchaSolver(reCaptcha):
def checkErrorStatus(response):
if response.status_code in [500, 502]:
raise reCaptchaServiceUnavailable(
f'9kw: Server Side Error {response.status_code}'
'9kw: Server Side Error {}'.format(response.status_code)
)
error_codes = {

View File

@@ -25,12 +25,12 @@ class Captcha(ABC):
def dynamicImport(cls, name):
if name not in captchaSolvers:
try:
__import__(f'{cls.__module__}.{name}')
__import__('{}.{}'.format(cls.__module__, name))
if not isinstance(captchaSolvers.get(name), Captcha):
raise ImportError('The anti captcha provider was not initialized.')
except ImportError as e:
sys.tracebacklimit = 0
logging.error(f'Unable to load {name} anti captcha provider -> {e}')
logging.error('Unable to load {} anti captcha provider -> {}'.format(name, e))
raise
return captchaSolvers[name]

View File

@@ -36,7 +36,7 @@ class captchaSolver(Captcha):
def checkErrorStatus(response):
if response.status_code in [500, 502]:
raise CaptchaServiceUnavailable(
f'CapMonster: Server Side Error {response.status_code}'
'CapMonster: Server Side Error {}'.format(response.status_code)
)
payload = response.json()
@@ -66,7 +66,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.post(
f'{self.host}/getTaskResult',
'{}/getTaskResult'.format(self.host),
json={
'clientKey': self.clientKey,
'taskId': taskID
@@ -113,7 +113,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.post(
f'{self.host}/createTask',
'{}/createTask'.format(self.host),
json=data,
allow_redirects=False,
timeout=30

View File

@@ -68,7 +68,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.post(
f'{self.host}/user',
'{}/user'.format(self.host),
headers={'Accept': 'application/json'},
data={
'username': self.username,
@@ -100,7 +100,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.post(
f'{self.host}/captcha/{jobID}/report',
'{}/captcha/{}/report'.format(self.host, jobID),
headers={'Accept': 'application/json'},
data={
'username': self.username,
@@ -137,7 +137,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.get(
f'{self.host}/captcha/{jobID}',
'{}/captcha/{}'.format(self.host, jobID),
headers={'Accept': 'application/json'}
),
check_success=_checkRequest,
@@ -203,7 +203,7 @@ class captchaSolver(Captcha):
response = polling2.poll(
lambda: self.session.post(
f'{self.host}/captcha',
'{}/captcha'.format(self.host),
headers={'Accept': 'application/json'},
data=data,
allow_redirects=False