summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-04-11 12:17:03 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2014-04-21 17:20:11 +0200
commitb5bff211b15187ff01dacaacdc022dc917d48b81 (patch)
tree16bf760303ab72dd6b4319f526bb874b73b5e283
parentFix EOF (diff)
downloadpyload-b5bff211b15187ff01dacaacdc022dc917d48b81.tar.xz
Fix retry time formats
Merges vuolter/pyload@498b9e3 (cherry picked from commit 381c4d02a900fac224ccaa802db080cf577ed2fb)
-rw-r--r--pyload/plugins/accounts/AlldebridCom.py2
-rw-r--r--pyload/plugins/accounts/HotfileCom.py2
-rw-r--r--pyload/plugins/accounts/MultiDebridCom.py2
-rw-r--r--pyload/plugins/accounts/UploadedTo.py4
-rw-r--r--pyload/plugins/addons/Checksum.py2
-rw-r--r--pyload/plugins/hoster/AlldebridCom.py4
-rw-r--r--pyload/plugins/hoster/BayfilesCom.py4
-rw-r--r--pyload/plugins/hoster/DebridItaliaCom.py2
-rw-r--r--pyload/plugins/hoster/DepositfilesCom.py2
-rw-r--r--pyload/plugins/hoster/FastixRu.py4
-rw-r--r--pyload/plugins/hoster/FastshareCz.py4
-rw-r--r--pyload/plugins/hoster/FilecloudIo.py2
-rw-r--r--pyload/plugins/hoster/FilefactoryCom.py4
-rw-r--r--pyload/plugins/hoster/FilepostCom.py4
-rw-r--r--pyload/plugins/hoster/FilerNet.py2
-rw-r--r--pyload/plugins/hoster/FileserveCom.py6
-rw-r--r--pyload/plugins/hoster/FreakshareCom.py4
-rw-r--r--pyload/plugins/hoster/FshareVn.py4
-rw-r--r--pyload/plugins/hoster/Keep2shareCC.py2
-rw-r--r--pyload/plugins/hoster/LuckyShareNet.py2
-rw-r--r--pyload/plugins/hoster/MegasharesCom.py8
-rw-r--r--pyload/plugins/hoster/Premium4Me.py2
-rw-r--r--pyload/plugins/hoster/QuickshareCz.py4
-rw-r--r--pyload/plugins/hoster/RealdebridCom.py2
-rw-r--r--pyload/plugins/hoster/ReloadCc.py8
-rw-r--r--pyload/plugins/hoster/ShareRapidCom.py4
-rw-r--r--pyload/plugins/hoster/ShareonlineBiz.py6
-rw-r--r--pyload/plugins/hoster/SimplydebridCom.py2
-rw-r--r--pyload/plugins/hoster/UploadedTo.py2
-rw-r--r--pyload/plugins/hoster/UploadheroCom.py2
-rw-r--r--pyload/plugins/hoster/UploadingCom.py2
-rw-r--r--pyload/plugins/hoster/XFileSharingPro.py2
-rw-r--r--pyload/plugins/hoster/ZippyshareCom.py2
33 files changed, 54 insertions, 54 deletions
diff --git a/pyload/plugins/accounts/AlldebridCom.py b/pyload/plugins/accounts/AlldebridCom.py
index ea173d19d..a0a518ce1 100644
--- a/pyload/plugins/accounts/AlldebridCom.py
+++ b/pyload/plugins/accounts/AlldebridCom.py
@@ -34,7 +34,7 @@ class AlldebridCom(MultiHoster):
data["password"]))
self.logDebug(page)
xml = dom.parseString(page)
- exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 86400
+ exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60
account_info = {"validuntil": exp_time, "trafficleft": -1}
return account_info
diff --git a/pyload/plugins/accounts/HotfileCom.py b/pyload/plugins/accounts/HotfileCom.py
index 72a04777f..7188e6758 100644
--- a/pyload/plugins/accounts/HotfileCom.py
+++ b/pyload/plugins/accounts/HotfileCom.py
@@ -47,7 +47,7 @@ class HotfileCom(Account):
info["premium_until"] = info["premium_until"][:19]
zone = int(zone[:3])
- validuntil = int(mktime(strptime(info["premium_until"], "%Y-%m-%d %H:%M:%S"))) + (zone * 3600)
+ validuntil = int(mktime(strptime(info["premium_until"], "%Y-%m-%d %H:%M:%S"))) + (zone * 60 * 60)
tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True}
elif info['is_premium'] == '0':
diff --git a/pyload/plugins/accounts/MultiDebridCom.py b/pyload/plugins/accounts/MultiDebridCom.py
index 5d3536684..0c7b1d230 100644
--- a/pyload/plugins/accounts/MultiDebridCom.py
+++ b/pyload/plugins/accounts/MultiDebridCom.py
@@ -31,7 +31,7 @@ class MultiDebridCom(MultiHoster):
def loadAccountInfo(self, user, req):
if 'days_left' in self.json_data:
- validuntil = int(time() + self.json_data['days_left'] * 86400)
+ validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60)
return {"premium": True, "validuntil": validuntil, "trafficleft": -1}
else:
self.logError('Unable to get account information')
diff --git a/pyload/plugins/accounts/UploadedTo.py b/pyload/plugins/accounts/UploadedTo.py
index 83bfb3f14..b6058115b 100644
--- a/pyload/plugins/accounts/UploadedTo.py
+++ b/pyload/plugins/accounts/UploadedTo.py
@@ -50,8 +50,8 @@ class UploadedTo(Account):
raw_valid = re.findall(r"(\d+) (Week|weeks|days|day|hours|hour)", raw_valid)
validuntil = time()
for n, u in raw_valid:
- validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24,
- "day": 24, "hours": 1, "hour": 1}[u]
+ validuntil += int(n) * 60 * 60 * {"Week": 168, "weeks": 168, "days": 24,
+ "day": 24, "hours": 1, "hour": 1}[u]
return {"validuntil": validuntil, "trafficleft": traffic, "maxtraffic": 50 * 1024 * 1024}
else:
diff --git a/pyload/plugins/addons/Checksum.py b/pyload/plugins/addons/Checksum.py
index fb7087de9..af37d69e6 100644
--- a/pyload/plugins/addons/Checksum.py
+++ b/pyload/plugins/addons/Checksum.py
@@ -145,7 +145,7 @@ class Checksum(Hook):
if pyfile.plugin.retries < max_tries:
if local_file:
remove(local_file)
- pyfile.plugin.retry(reason=msg, max_tries=max_tries, wait_time=self.getConfig("wait_time"))
+ pyfile.plugin.retry(max_tries=max_tries, wait_time=self.getConfig("wait_time"), reason=msg)
elif retry_action == "nothing":
return
elif check_action == "nothing":
diff --git a/pyload/plugins/hoster/AlldebridCom.py b/pyload/plugins/hoster/AlldebridCom.py
index 7634c2460..13bfb018c 100644
--- a/pyload/plugins/hoster/AlldebridCom.py
+++ b/pyload/plugins/hoster/AlldebridCom.py
@@ -78,6 +78,6 @@ class AlldebridCom(Hoster):
"empty": re.compile(r"^$")})
if check == "error":
- self.retry(reason="An error occured while generating link.", wait_time=60)
+ self.retry(wait_time=60, reason="An error occured while generating link.")
elif check == "empty":
- self.retry(reason="Downloaded File was empty.", wait_time=60)
+ self.retry(wait_time=60, reason="Downloaded File was empty.")
diff --git a/pyload/plugins/hoster/BayfilesCom.py b/pyload/plugins/hoster/BayfilesCom.py
index 849370f3f..f1b36221f 100644
--- a/pyload/plugins/hoster/BayfilesCom.py
+++ b/pyload/plugins/hoster/BayfilesCom.py
@@ -90,9 +90,9 @@ class BayfilesCom(SimpleHoster):
"notfound": re.compile(r"<title>404 Not Found</title>")
})
if check == "waitforfreeslots":
- self.retry(30, 60 * 5, "Wait for free slot")
+ self.retry(30, 5 * 60, "Wait for free slot")
elif check == "notfound":
- self.retry(30, 60 * 5, "404 Not found")
+ self.retry(30, 5 * 60, "404 Not found")
getInfo = create_getInfo(BayfilesCom)
diff --git a/pyload/plugins/hoster/DebridItaliaCom.py b/pyload/plugins/hoster/DebridItaliaCom.py
index 0e68984d9..441151b99 100644
--- a/pyload/plugins/hoster/DebridItaliaCom.py
+++ b/pyload/plugins/hoster/DebridItaliaCom.py
@@ -63,4 +63,4 @@ class DebridItaliaCom(Hoster):
check = self.checkDownload({"empty": re.compile(r"^$")})
if check == "empty":
- self.retry(5, 120, 'Empty file downloaded')
+ self.retry(5, 2 * 60, "Empty file downloaded")
diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py
index 20d88f8a0..f1b3d18e5 100644
--- a/pyload/plugins/hoster/DepositfilesCom.py
+++ b/pyload/plugins/hoster/DepositfilesCom.py
@@ -103,7 +103,7 @@ class DepositfilesCom(SimpleHoster):
def handlePremium(self):
if '<span class="html_download_api-gold_traffic_limit">' in self.html:
self.logWarning("Download limit reached")
- self.retry(25, 3600, "Download limit reached")
+ self.retry(25, 60 * 60, "Download limit reached")
elif 'onClick="show_gold_offer' in self.html:
self.account.relogin(self.user)
self.retry()
diff --git a/pyload/plugins/hoster/FastixRu.py b/pyload/plugins/hoster/FastixRu.py
index 39091d769..ef8838f8e 100644
--- a/pyload/plugins/hoster/FastixRu.py
+++ b/pyload/plugins/hoster/FastixRu.py
@@ -61,6 +61,6 @@ class FastixRu(Hoster):
"empty": re.compile(r"^$")})
if check == "error":
- self.retry(reason="An error occurred while generating link.", wait_time=60)
+ self.retry(wait_time=60, reason="An error occurred while generating link.")
elif check == "empty":
- self.retry(reason="Downloaded File was empty.", wait_time=60)
+ self.retry(wait_time=60, reason="Downloaded File was empty.")
diff --git a/pyload/plugins/hoster/FastshareCz.py b/pyload/plugins/hoster/FastshareCz.py
index 93fbad6be..4418aa29c 100644
--- a/pyload/plugins/hoster/FastshareCz.py
+++ b/pyload/plugins/hoster/FastshareCz.py
@@ -66,9 +66,9 @@ class FastshareCz(SimpleHoster):
})
if check == "paralell_dl":
- self.retry(6, 600, "Paralell download")
+ self.retry(6, 10 * 60, "Paralell download")
elif check == "wrong_captcha":
- self.retry(5, 1, "Wrong captcha")
+ self.retry(max_tries=5, reason="Wrong captcha")
def handlePremium(self):
header = self.load(self.pyfile.url, just_header=True)
diff --git a/pyload/plugins/hoster/FilecloudIo.py b/pyload/plugins/hoster/FilecloudIo.py
index 8ccef67e1..dbf925c14 100644
--- a/pyload/plugins/hoster/FilecloudIo.py
+++ b/pyload/plugins/hoster/FilecloudIo.py
@@ -63,7 +63,7 @@ class FilecloudIo(SimpleHoster):
self.account.form_data = {"recaptcha_challenge_field": captcha_challenge,
"recaptcha_response_field": captcha_response}
self.account.relogin(self.user)
- self.retry(max_tries=2)
+ self.retry(2)
json_url = "http://filecloud.io/download-request.json"
response = self.load(json_url, post=data)
diff --git a/pyload/plugins/hoster/FilefactoryCom.py b/pyload/plugins/hoster/FilefactoryCom.py
index 8e0bd2494..97204a1a2 100644
--- a/pyload/plugins/hoster/FilefactoryCom.py
+++ b/pyload/plugins/hoster/FilefactoryCom.py
@@ -39,7 +39,7 @@ class FilefactoryCom(SimpleHoster):
if "Currently only Premium Members can download files larger than" in self.html:
self.fail("File too large for free download")
elif "All free download slots on this server are currently in use" in self.html:
- self.retry(50, 900, "All free slots are busy")
+ self.retry(50, 15 * 60, "All free slots are busy")
m = re.search(r'data-href-direct="(http://[^"]+)"', self.html)
if m:
@@ -80,7 +80,7 @@ class FilefactoryCom(SimpleHoster):
if check == "multiple":
self.logDebug("Parallel downloads detected; waiting 15 minutes")
- self.retry(wait_time=15 * 60, reason='Parallel downloads')
+ self.retry(wait_time=15 * 60, reason="Parallel downloads")
elif check == "error":
self.fail("Unknown error")
diff --git a/pyload/plugins/hoster/FilepostCom.py b/pyload/plugins/hoster/FilepostCom.py
index 1deec2c18..e18455255 100644
--- a/pyload/plugins/hoster/FilepostCom.py
+++ b/pyload/plugins/hoster/FilepostCom.py
@@ -122,8 +122,8 @@ class FilepostCom(SimpleHoster):
# see the two lines commented out with "# ~?".
if 'error' in json_response['js']:
if json_response['js']['error'] == 'download_delay':
- self.retry(json_response['js']['params']['next_download'])
- # ~? self.retry(js_answer['params']['next_download'])
+ self.retry(wait_time=json_response['js']['params']['next_download'])
+ # ~? self.retry(wait_time=js_answer['params']['next_download'])
elif 'Wrong file password' in json_response['js']['error']:
return None
elif 'You entered a wrong CAPTCHA code' in json_response['js']['error']:
diff --git a/pyload/plugins/hoster/FilerNet.py b/pyload/plugins/hoster/FilerNet.py
index 3a9251fb3..5eaa19785 100644
--- a/pyload/plugins/hoster/FilerNet.py
+++ b/pyload/plugins/hoster/FilerNet.py
@@ -55,7 +55,7 @@ class FilerNet(SimpleHoster):
m = re.search(r'musst du <span id="time">(\d+)</span> Sekunden warten', self.html)
if m:
waittime = int(m.group(1))
- self.retry(3, waittime, 'Wait between free downloads')
+ self.retry(3, waittime, "Wait between free downloads")
self.getFileInfo()
diff --git a/pyload/plugins/hoster/FileserveCom.py b/pyload/plugins/hoster/FileserveCom.py
index 6697c133f..30471d69f 100644
--- a/pyload/plugins/hoster/FileserveCom.py
+++ b/pyload/plugins/hoster/FileserveCom.py
@@ -133,9 +133,9 @@ class FileserveCom(Hoster):
self.doLongWait(self.lastCheck)
elif check == "limit":
#download limited reached for today (not a exact time known)
- self.setWait(180 * 60, True) # wait 3 hours
+ self.setWait(3 * 60 * 60, True) # wait 3 hours #TO-DO: resolve waittime using UnrestrictLi's secondsToMidnight
self.wait()
- self.retry(max_tries=0)
+ self.retry()
self.thread.m.reconnecting.wait(3) # Ease issue with later downloads appearing to be in parallel
@@ -178,7 +178,7 @@ class FileserveCom(Hoster):
self.fail("Invalid captcha")
def doLongWait(self, m):
- wait_time = (int(m.group(1)) * {'seconds': 1, 'minutes': 60, 'hours': 3600}[m.group(2)]) if m else 720
+ wait_time = (int(m.group(1)) * {'seconds': 1, 'minutes': 60, 'hours': 3600}[m.group(2)]) if m else 12 * 60
self.setWait(wait_time, True)
self.wait()
self.retry()
diff --git a/pyload/plugins/hoster/FreakshareCom.py b/pyload/plugins/hoster/FreakshareCom.py
index 2dcd9ee48..f4ed4958f 100644
--- a/pyload/plugins/hoster/FreakshareCom.py
+++ b/pyload/plugins/hoster/FreakshareCom.py
@@ -53,7 +53,7 @@ class FreakshareCom(Hoster):
self.invalidCaptcha()
self.retry()
elif check == "downloadserver":
- self.retry(5, 900, 'No Download server')
+ self.retry(5, 15 * 60, "No Download server")
def prepare(self):
pyfile = self.pyfile
@@ -123,7 +123,7 @@ class FreakshareCom(Hoster):
if "Your Traffic is used up for today" in self.html:
self.wantReconnect = True
- return 24 * 3600
+ return 24 * 60 * 60
timestring = re.search('\s*var\s(?:downloadWait|time)\s=\s(\d*)[.\d]*;', self.html)
if timestring:
diff --git a/pyload/plugins/hoster/FshareVn.py b/pyload/plugins/hoster/FshareVn.py
index 6b73f1975..34539f965 100644
--- a/pyload/plugins/hoster/FshareVn.py
+++ b/pyload/plugins/hoster/FshareVn.py
@@ -100,12 +100,12 @@ class FshareVn(SimpleHoster):
if found:
self.logInfo("Wait until %s ICT" % found.group(1))
wait_until = mktime(strptime(found.group(1), "%d/%m/%Y %H:%M"))
- self.setWait(wait_until - mktime(gmtime()) - 7 * 3600, True)
+ self.setWait(wait_until - mktime(gmtime()) - 7 * 60 * 60, True)
self.wait()
self.retry()
elif '<ul class="message-error">' in self.html:
self.logError("Unknown error occured or wait time not parsed")
- self.retry(30, 120, "Unknown error")
+ self.retry(30, 2 * 60, "Unknown error")
def checkDownloadedFile(self):
# check download
diff --git a/pyload/plugins/hoster/Keep2shareCC.py b/pyload/plugins/hoster/Keep2shareCC.py
index cb5f4e9a9..8de16e349 100644
--- a/pyload/plugins/hoster/Keep2shareCC.py
+++ b/pyload/plugins/hoster/Keep2shareCC.py
@@ -74,7 +74,7 @@ class Keep2shareCC(SimpleHoster):
if m:
# if someone is already downloading on our line, wait 30min and retry
self.logDebug('Already downloading, waiting for 30 minutes')
- self.wait(1800, reconnect=True)
+ self.wait(30 * 60, reconnect=True)
self.retry()
m = re.search(self.DIRECT_LINK_PATTERN, self.html)
diff --git a/pyload/plugins/hoster/LuckyShareNet.py b/pyload/plugins/hoster/LuckyShareNet.py
index 2208f90d7..271d166c0 100644
--- a/pyload/plugins/hoster/LuckyShareNet.py
+++ b/pyload/plugins/hoster/LuckyShareNet.py
@@ -31,7 +31,7 @@ class LuckyShareNet(SimpleHoster):
else:
self.parseError('Unable to detect wait time between free downloads')
elif 'Hash expired' in rep:
- self.retry(reason='Hash expired')
+ self.retry(reason="Hash expired")
return json_loads(rep)
# TODO: There should be a filesize limit for free downloads
diff --git a/pyload/plugins/hoster/MegasharesCom.py b/pyload/plugins/hoster/MegasharesCom.py
index 9949da9d5..bc0e9dd05 100644
--- a/pyload/plugins/hoster/MegasharesCom.py
+++ b/pyload/plugins/hoster/MegasharesCom.py
@@ -52,7 +52,7 @@ class MegasharesCom(SimpleHoster):
self.html = self.load(self.pyfile.url, decode=True)
if self.NO_SLOTS_PATTERN in self.html:
- self.retry(wait_time=300)
+ self.retry(wait_time=5 * 60)
self.getFileInfo()
#if self.pyfile.size > 576716800: self.fail("This file is too large for free download")
@@ -78,7 +78,7 @@ class MegasharesCom(SimpleHoster):
if 'Thank you for reactivating your passport.' in response:
self.correctCaptcha()
- self.retry(0)
+ self.retry()
else:
self.invalidCaptcha()
else:
@@ -94,8 +94,8 @@ class MegasharesCom(SimpleHoster):
if not data_left:
found = re.search(self.PASSPORT_RENEW_PATTERN, self.html)
- renew = (found.group(1) + 60 * (found.group(2) + 60 * found.group(3))) if found else 600
- self.retry(renew, 15, "Unable to get passport")
+ renew = found.group(1) + found.group(2) + found.group(3) * 60 * 60 if found else 10 * 60
+ self.retry(max_tries=15, wait_time=renew, reason="Unable to get passport")
self.handleDownload(False)
diff --git a/pyload/plugins/hoster/Premium4Me.py b/pyload/plugins/hoster/Premium4Me.py
index ec76a7315..4f9fa216d 100644
--- a/pyload/plugins/hoster/Premium4Me.py
+++ b/pyload/plugins/hoster/Premium4Me.py
@@ -42,7 +42,7 @@ class Premium4Me(Hoster):
check = self.checkDownload({"nopremium": "No premium account available"})
if check == "nopremium":
- self.retry(60, 300, 'No premium account available')
+ self.retry(60, 5 * 60, "No premium account available")
err = ''
if self.req.http.code == '420':
diff --git a/pyload/plugins/hoster/QuickshareCz.py b/pyload/plugins/hoster/QuickshareCz.py
index bbb2eaa1b..3c84ccbce 100644
--- a/pyload/plugins/hoster/QuickshareCz.py
+++ b/pyload/plugins/hoster/QuickshareCz.py
@@ -85,9 +85,9 @@ class QuickshareCz(SimpleHoster):
found = re.search(r'/chyba/(\d+)', download_url)
if found:
if found.group(1) == '1':
- self.retry(max_tries=60, wait_time=120, reason="This IP is already downloading")
+ self.retry(60, 2 * 60, "This IP is already downloading")
elif found.group(1) == '2':
- self.retry(max_tries=60, wait_time=60, reason="No free slots available")
+ self.retry(60, 60, "No free slots available")
else:
self.fail('Error %d' % found.group(1))
diff --git a/pyload/plugins/hoster/RealdebridCom.py b/pyload/plugins/hoster/RealdebridCom.py
index 73be32e70..9174ae300 100644
--- a/pyload/plugins/hoster/RealdebridCom.py
+++ b/pyload/plugins/hoster/RealdebridCom.py
@@ -86,4 +86,4 @@ class RealdebridCom(Hoster):
if check == "error":
#usual this download can safely be retried
- self.retry(reason="An error occured while generating link.", wait_time=60)
+ self.retry(wait_time=60, reason="An error occured while generating link.")
diff --git a/pyload/plugins/hoster/ReloadCc.py b/pyload/plugins/hoster/ReloadCc.py
index 9c23c8c49..e92028503 100644
--- a/pyload/plugins/hoster/ReloadCc.py
+++ b/pyload/plugins/hoster/ReloadCc.py
@@ -63,13 +63,13 @@ class ReloadCc(Hoster):
elif e.code == 409:
self.logWarning("The hoster seems to be a limited hoster and you've used your daily traffic for this hoster: %s" % self.pyfile.url)
# Wait for 6 hours and retry up to 4 times => one day
- self.retry(max_retries=4, wait_time=(3600 * 6), reason="Limited hoster traffic limit exceeded")
+ self.retry(4, 6 * 60 * 60, "Limited hoster traffic limit exceeded")
elif e.code == 429:
# Too many connections, wait 2 minutes and try again
- self.retry(max_retries=5, wait_time=120, reason="Too many concurrent connections")
+ self.retry(5, 2 * 60, "Too many concurrent connections")
elif e.code == 503:
# Retry in 10 minutes
- self.retry(wait_time=600,
+ self.retry(wait_time=10 * 60,
reason="Reload.cc is currently in maintenance mode! Please check again later.")
else:
self.fail(
@@ -103,7 +103,7 @@ class ReloadCc(Hoster):
self.fail("Password required for file access")
elif e.code == 429:
# Too many connections, wait 2 minutes and try again
- self.retry(max_retries=5, wait_time=120, reason="Too many concurrent connections")
+ self.retry(5, 2 * 60, "Too many concurrent connections")
else:
self.fail(
"Internal error within Reload.cc. Please contact the Reload.cc support for further information."
diff --git a/pyload/plugins/hoster/ShareRapidCom.py b/pyload/plugins/hoster/ShareRapidCom.py
index 7f1709865..ac56d258c 100644
--- a/pyload/plugins/hoster/ShareRapidCom.py
+++ b/pyload/plugins/hoster/ShareRapidCom.py
@@ -51,7 +51,7 @@ class ShareRapidCom(SimpleHoster):
self.html = self.load(pyfile.url, decode=True)
except BadHeader, e:
self.account.relogin(self.user)
- self.retry(3, 0, str(e))
+ self.retry(max_tries=3, reason=str(e))
self.getFileInfo()
@@ -64,7 +64,7 @@ class ShareRapidCom(SimpleHoster):
else:
if re.search(self.ERR_LOGIN_PATTERN, self.html):
self.relogin(self.user)
- self.retry(3, 0, "User login failed")
+ self.retry(max_tries=3, reason="User login failed")
elif re.search(self.ERR_CREDIT_PATTERN, self.html):
self.fail("Not enough credit left")
else:
diff --git a/pyload/plugins/hoster/ShareonlineBiz.py b/pyload/plugins/hoster/ShareonlineBiz.py
index 066919fda..b31225a59 100644
--- a/pyload/plugins/hoster/ShareonlineBiz.py
+++ b/pyload/plugins/hoster/ShareonlineBiz.py
@@ -73,9 +73,9 @@ class ShareonlineBiz(Hoster):
# check = self.checkDownload({"failure": re.compile(self.ERROR_INFO_PATTERN)})
# if check == "failure":
# try:
- # self.retry(reason = self.lastCheck.group(1).decode("utf8"))
+ # self.retry(reason=self.lastCheck.group(1).decode("utf8"))
# except:
- # self.retry(reason = "Unknown error")
+ # self.retry(reason="Unknown error")
if self.api_data:
self.check_data = {"size": int(self.api_data['size']), "md5": self.api_data['md5']}
@@ -138,7 +138,7 @@ class ShareonlineBiz(Hoster):
if check == "cookie":
self.retry(5, 60, "Cookie failure")
elif check == "fail":
- self.retry(5, 300, "Download failed")
+ self.retry(5, 5 * 60, "Download failed")
def handlePremium(self): # should be working better loading (account) api internally
self.account.getAccountInfo(self.user, True)
diff --git a/pyload/plugins/hoster/SimplydebridCom.py b/pyload/plugins/hoster/SimplydebridCom.py
index 0446981f1..32bd43daa 100644
--- a/pyload/plugins/hoster/SimplydebridCom.py
+++ b/pyload/plugins/hoster/SimplydebridCom.py
@@ -58,4 +58,4 @@ class SimplydebridCom(Hoster):
check = self.checkDownload({"bad1": "No address associated with hostname", "bad2": "<html"})
if check == "bad1" or check == "bad2":
- self.retry(24, 150, 'Bad file downloaded')
+ self.retry(24, 3 * 60, "Bad file downloaded")
diff --git a/pyload/plugins/hoster/UploadedTo.py b/pyload/plugins/hoster/UploadedTo.py
index 5b53b0aa5..c376954fa 100644
--- a/pyload/plugins/hoster/UploadedTo.py
+++ b/pyload/plugins/hoster/UploadedTo.py
@@ -175,7 +175,7 @@ class UploadedTo(Hoster):
if 'var free_enabled = false;' in self.html:
self.logError("Free-download capacities exhausted.")
- self.retry(24, 300)
+ self.retry(max_tries=24, wait_time=5 * 60)
found = re.search(r"Current waiting period: <span>(\d+)</span> seconds", self.html)
if not found:
diff --git a/pyload/plugins/hoster/UploadheroCom.py b/pyload/plugins/hoster/UploadheroCom.py
index 993f34a0f..053705c05 100644
--- a/pyload/plugins/hoster/UploadheroCom.py
+++ b/pyload/plugins/hoster/UploadheroCom.py
@@ -81,7 +81,7 @@ class UploadheroCom(SimpleHoster):
self.html = self.load("http://uploadhero.co%s" % found.group(1))
found = re.search(self.IP_WAIT_PATTERN, self.html)
- wait_time = (int(found.group(1)) * 60 + int(found.group(2))) if found else 300
+ wait_time = (int(found.group(1)) * 60 + int(found.group(2))) if found else 5 * 60
self.setWait(wait_time, True)
self.wait()
self.retry()
diff --git a/pyload/plugins/hoster/UploadingCom.py b/pyload/plugins/hoster/UploadingCom.py
index a5c6946ff..230c67490 100644
--- a/pyload/plugins/hoster/UploadingCom.py
+++ b/pyload/plugins/hoster/UploadingCom.py
@@ -73,7 +73,7 @@ class UploadingCom(SimpleHoster):
if found:
self.pyfile.error = found.group(1)
self.logWarning(self.pyfile.error)
- self.retry(max_tries=6, wait_time=21600 if found.group(2) else 900, reason=self.pyfile.error)
+ self.retry(max_tries=6, wait_time=6 * 60 * 60 if found.group(2) else 15 * 60, reason=self.pyfile.error)
ajax_url = "http://uploading.com/files/get/?ajax"
self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
diff --git a/pyload/plugins/hoster/XFileSharingPro.py b/pyload/plugins/hoster/XFileSharingPro.py
index 20ba1b241..ce190f2fe 100644
--- a/pyload/plugins/hoster/XFileSharingPro.py
+++ b/pyload/plugins/hoster/XFileSharingPro.py
@@ -184,7 +184,7 @@ class XFileSharingPro(SimpleHoster):
if inputs['st'] == 'OK':
self.html = self.load(action, post=inputs)
elif inputs['st'] == 'Can not leech file':
- self.retry(max_tries=20, wait_time=180, reason=inputs['st'])
+ self.retry(max_tries=20, wait_time=3 * 60, reason=inputs['st'])
else:
self.fail(inputs['st'])
diff --git a/pyload/plugins/hoster/ZippyshareCom.py b/pyload/plugins/hoster/ZippyshareCom.py
index 54e8eee21..93942c43f 100644
--- a/pyload/plugins/hoster/ZippyshareCom.py
+++ b/pyload/plugins/hoster/ZippyshareCom.py
@@ -60,7 +60,7 @@ class ZippyshareCom(SimpleHoster):
elif swf_sts == '1':
self.setStorage("swf_sts", 2)
- self.retry(max_tries=1)
+ self.retry(1)
def get_file_url(self):
""" returns the absolute downloadable filepath