summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-27 01:38:32 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-27 01:38:32 +0200
commit0d220d634e512d89bda540f91c643b361c82ea8a (patch)
tree198e2be046a1d6fdbbec0b7c44f1d5563f327528 /module/plugins/hoster
parentBetter dead plugin fallback (diff)
downloadpyload-0d220d634e512d89bda540f91c643b361c82ea8a.tar.xz
Logging string cosmetics
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/AlldebridCom.py2
-rw-r--r--module/plugins/hoster/CzshareCom.py2
-rw-r--r--module/plugins/hoster/DataHu.py2
-rw-r--r--module/plugins/hoster/DateiTo.py2
-rw-r--r--module/plugins/hoster/EdiskCz.py2
-rw-r--r--module/plugins/hoster/EgoFilesCom.py6
-rw-r--r--module/plugins/hoster/FastixRu.py2
-rw-r--r--module/plugins/hoster/FilefactoryCom.py4
-rw-r--r--module/plugins/hoster/FilepostCom.py2
-rw-r--r--module/plugins/hoster/FilerNet.py8
-rw-r--r--module/plugins/hoster/FileserveCom.py4
-rw-r--r--module/plugins/hoster/FshareVn.py2
-rw-r--r--module/plugins/hoster/Keep2shareCC.py8
-rw-r--r--module/plugins/hoster/LetitbitNet.py4
-rw-r--r--module/plugins/hoster/LinksnappyCom.py2
-rw-r--r--module/plugins/hoster/LuckyShareNet.py12
-rw-r--r--module/plugins/hoster/MediafireCom.py2
-rw-r--r--module/plugins/hoster/NarodRu.py2
-rw-r--r--module/plugins/hoster/NosuploadCom.py2
-rw-r--r--module/plugins/hoster/NowDownloadEu.py2
-rw-r--r--module/plugins/hoster/OneFichierCom.py2
-rw-r--r--module/plugins/hoster/PromptfileCom.py4
-rw-r--r--module/plugins/hoster/QuickshareCz.py4
-rw-r--r--module/plugins/hoster/RapidgatorNet.py4
-rw-r--r--module/plugins/hoster/UlozTo.py8
-rw-r--r--module/plugins/hoster/UloziskoSk.py4
-rw-r--r--module/plugins/hoster/UnibytesCom.py2
-rw-r--r--module/plugins/hoster/UploadedTo.py4
-rw-r--r--module/plugins/hoster/UpstoreNet.py6
-rw-r--r--module/plugins/hoster/VeehdCom.py2
-rw-r--r--module/plugins/hoster/XFileSharingPro.py2
-rw-r--r--module/plugins/hoster/ZeveraCom.py72
32 files changed, 59 insertions, 127 deletions
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index 7201f1929..b1513bbac 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -50,7 +50,7 @@ class AlldebridCom(Hoster):
page = self.load(url)
data = json_loads(page)
- self.logDebug("Json data: %s" % str(data))
+ self.logDebug("Json data", data)
if data['error']:
if data['error'] == "This link isn't available on the hoster website.":
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index 51627dc33..df8cfea9e 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -57,7 +57,7 @@ class CzshareCom(SimpleHoster):
return False
except Exception, e:
# let's continue and see what happens...
- self.logError('Parse error (CREDIT): %s' % e)
+ self.logError("Parse error (CREDIT): %s" % e)
return True
diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py
index 3dc01eef3..6b68706a4 100644
--- a/module/plugins/hoster/DataHu.py
+++ b/module/plugins/hoster/DataHu.py
@@ -31,7 +31,7 @@ class DataHu(SimpleHoster):
m = re.search(self.LINK_PATTERN, self.html)
if m:
url = m.group(1)
- self.logDebug('Direct link: ' + url)
+ self.logDebug("Direct link: " + url)
else:
self.parseError('Unable to get direct link')
diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py
index ff8c430ee..c5155dc31 100644
--- a/module/plugins/hoster/DateiTo.py
+++ b/module/plugins/hoster/DateiTo.py
@@ -61,7 +61,7 @@ class DateiTo(SimpleHoster):
self.fail('Too bad...')
download_url = self.html
- self.logDebug('Download URL', download_url)
+ self.logDebug("Download URL", download_url)
self.download(download_url)
def checkErrors(self):
diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py
index 449dc0050..aed09fdcb 100644
--- a/module/plugins/hoster/EdiskCz.py
+++ b/module/plugins/hoster/EdiskCz.py
@@ -29,7 +29,7 @@ class EdiskCz(SimpleHoster):
def process(self, pyfile):
url = re.sub("/(stahni|sk/stahni)/", "/en/download/", pyfile.url)
- self.logDebug('URL:' + url)
+ self.logDebug("URL:" + url)
m = re.search(self.ACTION_PATTERN, url)
if m is None:
diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py
index 7f7104da1..a99e43731 100644
--- a/module/plugins/hoster/EgoFilesCom.py
+++ b/module/plugins/hoster/EgoFilesCom.py
@@ -56,7 +56,7 @@ class EgoFilesCom(SimpleHoster):
self.html = self.load(self.pyfile.url, post=post_data, decode=True)
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
- self.logInfo('Wrong captcha')
+ self.logInfo("Wrong captcha")
self.invalidCaptcha()
elif hasattr(m, 'group'):
downloadURL = m.group('link')
@@ -73,7 +73,7 @@ class EgoFilesCom(SimpleHoster):
def handlePremium(self):
header = self.load(self.pyfile.url, just_header=True)
if 'location' in header:
- self.logDebug('DIRECT LINK from header: ' + header['location'])
+ self.logDebug("DIRECT LINK from header: " + header['location'])
self.download(header['location'])
else:
self.html = self.load(self.pyfile.url, decode=True)
@@ -82,7 +82,7 @@ class EgoFilesCom(SimpleHoster):
if m is None:
self.parseError('Unable to detect direct download url')
else:
- self.logDebug('DIRECT URL from html: ' + m.group('link'))
+ self.logDebug("DIRECT URL from html: " + m.group('link'))
self.download(m.group('link'), disposition=True)
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index 199544840..59f88a32b 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -47,7 +47,7 @@ class FastixRu(Hoster):
url = "http://fastix.ru/api_v2/?apikey=%s&sub=getdirectlink&link=%s" % (api_key, pyfile.url)
page = self.load(url)
data = json_loads(page)
- self.logDebug("Json data: %s" % str(data))
+ self.logDebug("Json data", data)
if "error\":true" in page:
self.offline()
else:
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py
index 627e4dee9..eb0c497a5 100644
--- a/module/plugins/hoster/FilefactoryCom.py
+++ b/module/plugins/hoster/FilefactoryCom.py
@@ -73,7 +73,7 @@ class FilefactoryCom(SimpleHoster):
self.parseError('Unable to detect free direct link')
direct = direct.group(1)
- self.logDebug('DIRECT LINK: ' + direct)
+ self.logDebug("DIRECT LINK: " + direct)
self.download(direct, disposition=True)
check = self.checkDownload({"multiple": "You are currently downloading too many files at once.",
@@ -102,5 +102,5 @@ class FilefactoryCom(SimpleHoster):
else:
self.parseError('Unable to detect premium direct link')
- self.logDebug('DIRECT PREMIUM LINK: ' + url)
+ self.logDebug("DIRECT PREMIUM LINK: " + url)
self.download(url, disposition=True)
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index 0e1b6ea5a..c5439cf01 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -114,7 +114,7 @@ class FilepostCom(SimpleHoster):
elif 'CAPTCHA Code nicht korrekt' in json_response['js']['error']:
return None
elif 'CAPTCHA' in json_response['js']['error']:
- self.logDebug('error response is unknown, but mentions CAPTCHA -> return None')
+ self.logDebug("Error response is unknown, but mentions CAPTCHA")
return None
else:
self.fail(json_response['js']['error'])
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index b4cb314b6..3ad9f2091 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -54,7 +54,7 @@ class FilerNet(SimpleHoster):
if 'token' not in inputs:
self.parseError('Unable to detect token')
token = inputs['token']
- self.logDebug('Token: ' + token)
+ self.logDebug("Token: " + token)
self.html = self.load(self.pyfile.url, post={'token': token}, decode=True)
@@ -62,7 +62,7 @@ class FilerNet(SimpleHoster):
if 'hash' not in inputs:
self.parseError('Unable to detect hash')
hash_data = inputs['hash']
- self.logDebug('Hash: ' + hash_data)
+ self.logDebug("Hash: " + hash_data)
downloadURL = r''
recaptcha = ReCaptcha(self)
@@ -83,7 +83,7 @@ class FilerNet(SimpleHoster):
self.correctCaptcha()
break
else:
- self.logInfo('Wrong captcha')
+ self.logInfo("Wrong captcha")
self.invalidCaptcha()
if not downloadURL:
@@ -102,7 +102,7 @@ class FilerNet(SimpleHoster):
self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings")
dl = 'http://filer.net' + m.group(1)
- self.logDebug('Direct link: ' + dl)
+ self.logDebug("Direct link: " + dl)
self.download(dl, disposition=True)
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index b7f051d80..7ddff112e 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -103,7 +103,7 @@ class FileserveCom(Hoster):
# show download link
response = self.load(self.url, post={"downloadLink": "show"}, decode=True)
- self.logDebug("show downloadLink response : %s" % response)
+ self.logDebug("Show downloadLink response : %s" % response)
if "fail" in response:
self.fail("Couldn't retrieve download url")
@@ -130,7 +130,7 @@ class FileserveCom(Hoster):
def doTimmer(self):
response = self.load(self.url, post={"downloadLink": "wait"}, decode=True)
- self.logDebug("wait response : %s" % response[:80])
+ self.logDebug("Wait response : %s" % response[:80])
if "fail" in response:
self.fail("Failed getting wait time")
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py
index bc042cbcc..3fd66bc32 100644
--- a/module/plugins/hoster/FshareVn.py
+++ b/module/plugins/hoster/FshareVn.py
@@ -69,7 +69,7 @@ class FshareVn(SimpleHoster):
self.parseError('FORM')
elif 'link_file_pwd_dl' in inputs:
for password in self.getPassword().splitlines():
- self.logInfo('Password protected link, trying "%s"' % password)
+ self.logInfo("Password protected link, trying", password)
inputs['link_file_pwd_dl'] = password
self.html = self.load(self.url, post=inputs, decode=True)
if not 'name="link_file_pwd_dl"' in self.html:
diff --git a/module/plugins/hoster/Keep2shareCC.py b/module/plugins/hoster/Keep2shareCC.py
index c1ec66435..78d6aaba7 100644
--- a/module/plugins/hoster/Keep2shareCC.py
+++ b/module/plugins/hoster/Keep2shareCC.py
@@ -52,7 +52,7 @@ class Keep2shareCC(SimpleHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
- self.logDebug('Hoster told us to wait for %s' % m.group(1))
+ self.logDebug("Hoster told us to wait for %s" % m.group(1))
# string to time convert courtesy of https://stackoverflow.com/questions/10663720
ftr = [3600, 60, 1]
wait_time = sum([a * b for a, b in zip(ftr, map(int, m.group(1).split(':')))])
@@ -62,7 +62,7 @@ class Keep2shareCC(SimpleHoster):
m = re.search(self.ALREADY_DOWNLOADING_PATTERN, self.html)
if m:
# if someone is already downloading on our line, wait 30min and retry
- self.logDebug('Already downloading, waiting for 30 minutes')
+ self.logDebug("Already downloading, waiting for 30 minutes")
self.wait(30 * 60, reconnect=True)
self.retry()
@@ -89,14 +89,14 @@ class Keep2shareCC(SimpleHoster):
self.correctCaptcha()
break
else:
- self.logInfo('Wrong captcha')
+ self.logInfo("Wrong captcha")
self.invalidCaptcha()
else:
self.fail("All captcha attempts failed")
def startDownload(self, url):
d = urljoin(self.base_url, url)
- self.logDebug('Direct Link: ' + d)
+ self.logDebug("Direct Link: " + d)
self.download(d, disposition=True)
def sanitize_url(self):
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py
index 3159be4f1..ec1dd14bd 100644
--- a/module/plugins/hoster/LetitbitNet.py
+++ b/module/plugins/hoster/LetitbitNet.py
@@ -148,13 +148,13 @@ class LetitbitNet(SimpleHoster):
json_data = [api_key, ["download/direct_links", {"pass": premium_key, "link": self.pyfile.url}]]
api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)})
- self.logDebug('API Data: ' + api_rep)
+ self.logDebug("API Data: " + api_rep)
api_rep = json_loads(api_rep)
if api_rep['status'] == 'FAIL':
self.fail(api_rep['data'])
direct_link = api_rep['data'][0][0]
- self.logDebug('Direct Link: ' + direct_link)
+ self.logDebug("Direct Link: " + direct_link)
self.download(direct_link, disposition=True)
diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py
index e4200e9f2..c6862cbd2 100644
--- a/module/plugins/hoster/LinksnappyCom.py
+++ b/module/plugins/hoster/LinksnappyCom.py
@@ -46,7 +46,7 @@ class LinksnappyCom(Hoster):
j = json_loads(r)['links'][0]
if j['error']:
- self.logError('Error converting the link: %s' % j['error'])
+ self.logError("Error converting the link: %s" % j['error'])
self.fail('Error converting the link')
pyfile.name = j['filename']
diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py
index 60f1204e5..de18b8512 100644
--- a/module/plugins/hoster/LuckyShareNet.py
+++ b/module/plugins/hoster/LuckyShareNet.py
@@ -30,7 +30,7 @@ class LuckyShareNet(SimpleHoster):
m = re.search(r"waitingtime = (\d+);", html)
if m:
waittime = int(m.group(1))
- self.logDebug('You have to wait %d seconds between free downloads' % waittime)
+ self.logDebug("You have to wait %d seconds between free downloads" % waittime)
self.retry(wait_time=waittime)
else:
self.parseError('Unable to detect wait time between free downloads')
@@ -42,9 +42,9 @@ class LuckyShareNet(SimpleHoster):
# TODO: Some files could not be downloaded in free mode
def handleFree(self):
file_id = re.match(self.__pattern__, self.pyfile.url).group('ID')
- self.logDebug('File ID: ' + file_id)
+ self.logDebug("File ID: " + file_id)
rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + file_id, decode=True)
- self.logDebug('JSON: ' + rep)
+ self.logDebug("JSON: " + rep)
json = self.parseJson(rep)
self.wait(int(json['time']))
@@ -54,13 +54,13 @@ class LuckyShareNet(SimpleHoster):
challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" %
(challenge, response, json['hash']), decode=True)
- self.logDebug('JSON: ' + rep)
+ self.logDebug("JSON: " + rep)
if 'link' in rep:
json.update(self.parseJson(rep))
self.correctCaptcha()
break
elif 'Verification failed' in rep:
- self.logInfo('Wrong captcha')
+ self.logInfo("Wrong captcha")
self.invalidCaptcha()
else:
self.parseError('Unable to get downlaod link')
@@ -68,7 +68,7 @@ class LuckyShareNet(SimpleHoster):
if not json['link']:
self.fail("No Download url retrieved/all captcha attempts failed")
- self.logDebug('Direct URL: ' + json['link'])
+ self.logDebug("Direct URL: " + json['link'])
self.download(json['link'])
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index d0878a34d..f83003424 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -74,7 +74,7 @@ class MediafireCom(SimpleHoster):
pyfile.url = re.sub(r'/view/?\?', '/?', pyfile.url)
self.url, result = checkHTMLHeader(pyfile.url)
- self.logDebug('Location (%d): %s' % (result, self.url))
+ self.logDebug("Location (%d): %s" % (result, self.url))
if result == 0:
self.html = self.load(self.url, decode=True)
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py
index 18bed0231..b55a9514e 100644
--- a/module/plugins/hoster/NarodRu.py
+++ b/module/plugins/hoster/NarodRu.py
@@ -53,7 +53,7 @@ class NarodRu(SimpleHoster):
else:
self.fail("No valid captcha code entered")
- self.logDebug('Download link: ' + url)
+ self.logDebug("Download link: " + url)
self.download(url)
diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py
index 3187dd89f..d35daa8f7 100644
--- a/module/plugins/hoster/NosuploadCom.py
+++ b/module/plugins/hoster/NosuploadCom.py
@@ -31,7 +31,7 @@ class NosuploadCom(XFileSharingPro):
# stage2: wait some time and press the "Download File" button
data = self.getPostParameters()
wait_time = re.search(self.WAIT_PATTERN, self.html, re.MULTILINE | re.DOTALL).group(1)
- self.logDebug("hoster told us to wait %s seconds" % wait_time)
+ self.logDebug("Hoster told us to wait %s seconds" % wait_time)
self.wait(wait_time)
self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True)
diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadEu.py
index 193698f17..5ad02b81b 100644
--- a/module/plugins/hoster/NowDownloadEu.py
+++ b/module/plugins/hoster/NowDownloadEu.py
@@ -53,7 +53,7 @@ class NowDownloadEu(SimpleHoster):
url = re.search(self.LINK_PATTERN, self.html)
if url is None:
self.fail('Download Link not Found (Plugin out of Date?)')
- self.logDebug('Download link: ' + str(url.group(1)))
+ self.logDebug("Download link", url.group(1))
self.download(str(url.group(1)))
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 0536f7185..8a962d062 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -40,7 +40,7 @@ class OneFichierCom(SimpleHoster):
self.html = self.load(self.pyfile.url, decode=True)
if self.WAITING_PATTERN in self.html:
- self.logInfo('You have to wait been each free download! Retrying in %d seconds.' % self.WAIT_TIME)
+ self.logInfo("You have to wait been each free download! Retrying in %d seconds." % self.WAIT_TIME)
self.waitAndRetry(self.WAIT_TIME)
else: # detect parallel download
m = re.search(self.NOT_PARALLEL, self.html)
diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py
index d16af7e5a..85e573f75 100644
--- a/module/plugins/hoster/PromptfileCom.py
+++ b/module/plugins/hoster/PromptfileCom.py
@@ -29,7 +29,7 @@ class PromptfileCom(SimpleHoster):
if m is None:
self.parseError("Unable to detect chash")
chash = m.group(1)
- self.logDebug("read chash %s" % chash)
+ self.logDebug("Read chash %s" % chash)
# continue to stage2
self.html = self.load(self.pyfile.url, decode=True, post={'chash': chash})
@@ -38,7 +38,7 @@ class PromptfileCom(SimpleHoster):
if m is None:
self.parseError("Unable to detect direct link")
direct = m.group(1)
- self.logDebug("found direct link: " + direct)
+ self.logDebug("Found direct link: " + direct)
self.download(direct, disposition=True)
diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py
index 972effffb..15a5726ef 100644
--- a/module/plugins/hoster/QuickshareCz.py
+++ b/module/plugins/hoster/QuickshareCz.py
@@ -36,11 +36,11 @@ class QuickshareCz(SimpleHoster):
if self.premium:
if 'UU_prihlasen' in self.jsvars:
if self.jsvars['UU_prihlasen'] == '0':
- self.logWarning('User not logged in')
+ self.logWarning("User not logged in")
self.relogin(self.user)
self.retry()
elif float(self.jsvars['UU_kredit']) < float(self.jsvars['kredit_odecet']):
- self.logWarning('Not enough credit left')
+ self.logWarning("Not enough credit left")
self.premium = False
if self.premium:
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index ce4d9ab36..3fea849ff 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -59,12 +59,12 @@ class RapidgatorNet(SimpleHoster):
json = self.load('%s/%s' % (self.API_URL, cmd),
get={'sid': self.sid,
'url': self.pyfile.url}, decode=True)
- self.logDebug('API:%s' % cmd, json, "SID: %s" % self.sid)
+ self.logDebug("API:%s" % cmd, json, "SID: %s" % self.sid)
json = json_loads(json)
status = json['response_status']
msg = json['response_details']
except BadHeader, e:
- self.logError('API:%s' % cmd, e, "SID: %s" % self.sid)
+ self.logError("API:%s" % cmd, e, "SID: %s" % self.sid)
status = e.code
msg = e
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index dbdaf3f8e..b81a2efcf 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -85,14 +85,14 @@ class UlozTo(SimpleHoster):
if not action or not inputs:
self.parseError("free download form")
- self.logDebug('inputs.keys() = ' + str(inputs.keys()))
+ self.logDebug("inputs.keys = " + str(inputs.keys()))
# get and decrypt captcha
if all(key in inputs for key in ("captcha_value", "captcha_id", "captcha_key")):
# Old version - last seen 9.12.2013
self.logDebug('Using "old" version')
captcha_value = self.decryptCaptcha("http://img.uloz.to/captcha/%s.png" % inputs['captcha_id'])
- self.logDebug('CAPTCHA ID: ' + inputs['captcha_id'] + ", CAPTCHA VALUE: " + captcha_value)
+ self.logDebug("CAPTCHA ID: " + inputs['captcha_id'] + ", CAPTCHA VALUE: " + captcha_value)
inputs.update({'captcha_id': inputs['captcha_id'], 'captcha_key': inputs['captcha_key'], 'captcha_value': captcha_value})
@@ -101,11 +101,11 @@ class UlozTo(SimpleHoster):
self.logDebug('Using "new" version')
xapca = self.load("http://www.ulozto.net/reloadXapca.php", get={"rnd": str(int(time.time()))})
- self.logDebug('xapca = ' + str(xapca))
+ self.logDebug("xapca = " + str(xapca))
data = json_loads(xapca)
captcha_value = self.decryptCaptcha(str(data['image']))
- self.logDebug("CAPTCHA HASH: " + data['hash'] + ", CAPTCHA SALT: " + str(data['salt']) + ", CAPTCHA VALUE: " + captcha_value)
+ self.logDebug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: " + str(data['salt']), "CAPTCHA VALUE: " + captcha_value)
inputs.update({'timestamp': data['timestamp'], 'salt': data['salt'], 'hash': data['hash'], 'captcha_value': captcha_value})
else:
diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py
index ac70f42d4..c81d36a13 100644
--- a/module/plugins/hoster/UloziskoSk.py
+++ b/module/plugins/hoster/UloziskoSk.py
@@ -48,7 +48,7 @@ class UloziskoSk(SimpleHoster):
self.parseError('ID')
id = m.group(1)
- self.logDebug('URL:' + parsed_url + ' ID:' + id)
+ self.logDebug("URL:" + parsed_url + ' ID:' + id)
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m is None:
@@ -57,7 +57,7 @@ class UloziskoSk(SimpleHoster):
captcha = self.decryptCaptcha(captcha_url, cookies=True)
- self.logDebug('CAPTCHA_URL:' + captcha_url + ' CAPTCHA:' + captcha)
+ self.logDebug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha)
self.download(parsed_url, post={
"antispam": captcha,
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index e936b84b1..c490bf879 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -63,7 +63,7 @@ class UnibytesCom(SimpleHoster):
else:
self.fail("No valid captcha code entered")
- self.logDebug('Download link: ' + url)
+ self.logDebug("Download link: " + url)
self.req.http.c.setopt(FOLLOWLOCATION, 1)
self.download(url)
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 286f1caf0..49c50865b 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -205,7 +205,7 @@ class UploadedTo(Hoster):
self.wait()
result = self.load(url, post=options)
- self.logDebug("result: %s" % result)
+ self.logDebug("Result: %s" % result)
if "limit-size" in result:
self.fail("File too big for free download")
@@ -220,7 +220,7 @@ class UploadedTo(Hoster):
self.wait()
self.retry()
elif '"err":"captcha"' in result:
- self.logError("ul.net captcha is disabled")
+ self.logError("captcha is disabled")
self.invalidCaptcha()
elif "type:'download'" in result:
self.correctCaptcha()
diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py
index 140024731..5293ce01d 100644
--- a/module/plugins/hoster/UpstoreNet.py
+++ b/module/plugins/hoster/UpstoreNet.py
@@ -31,7 +31,7 @@ class UpstoreNet(SimpleHoster):
if m is None:
self.parseError("could not detect hash")
chash = m.group(1)
- self.logDebug("read hash " + chash)
+ self.logDebug("Read hash " + chash)
# continue to stage2
post_data = {'hash': chash, 'free': 'Slow download'}
self.html = self.load(self.pyfile.url, post=post_data, decode=True)
@@ -41,7 +41,7 @@ class UpstoreNet(SimpleHoster):
recaptcha = ReCaptcha(self)
if not recaptcha.detect_key(self.html):
self.parseError("could not find recaptcha pattern")
- self.logDebug("using captcha key " + recaptcha.recaptcha_key)
+ self.logDebug("Using captcha key " + recaptcha.recaptcha_key)
# try the captcha 5 times
for i in xrange(5):
m = re.search(self.WAIT_PATTERN, self.html)
@@ -68,7 +68,7 @@ class UpstoreNet(SimpleHoster):
self.parseError("could not detect direct link")
direct = m.group(1)
- self.logDebug('found direct link: ' + direct)
+ self.logDebug("Found direct link: " + direct)
self.download(direct, disposition=True)
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py
index 66c258439..bdca87cc8 100644
--- a/module/plugins/hoster/VeehdCom.py
+++ b/module/plugins/hoster/VeehdCom.py
@@ -20,7 +20,7 @@ class VeehdCom(Hoster):
def _debug(self, msg):
- self.logDebug('[%s] %s' % (self.__name__, msg))
+ self.logDebug("[%s] %s" % (self.__name__, msg))
def setup(self):
self.multiDL = True
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index d7e24e0b0..e488b256d 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -203,7 +203,7 @@ class XFileSharingPro(SimpleHoster):
link = link.strip()
if self.captcha:
self.correctCaptcha()
- self.logDebug('DIRECT LINK: %s' % link)
+ self.logDebug("DIRECT LINK: %s" % link)
self.download(link, disposition=True)
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index b6b59b242..8d9871cb2 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -8,7 +8,7 @@ class ZeveraCom(Hoster):
__type__ = "hoster"
__version__ = "0.21"
- __pattern__ = r'http://(?:www\.)?zevera.com/.*'
+ __pattern__ = r'http://(?:www\.)?zevera\.com/.*'
__description__ = """Zevera.com hoster plugin"""
__author_name__ = "zoidberg"
@@ -24,7 +24,7 @@ class ZeveraCom(Hoster):
self.logError(_("Please enter your %s account or deactivate this plugin") % "zevera.com")
self.fail("No zevera.com account provided")
- self.logDebug("zevera.com: Old URL: %s" % pyfile.url)
+ self.logDebug("Old URL: %s" % pyfile.url)
if self.account.getAPIData(self.req, cmd="checklink", olink=pyfile.url) != "Alive":
self.fail("Offline or not downloadable - contact Zevera support")
@@ -38,71 +38,3 @@ class ZeveraCom(Hoster):
check = self.checkDownload({"error": 'action="ErrorDownload.aspx'})
if check == "error":
self.fail("Error response received - contact Zevera support")
-
- # BitAPI not used - defunct, probably abandoned by Zevera
- #
- # api_url = "http://zevera.com/API.ashx"
- #
- # def process(self, pyfile):
- # if not self.account:
- # self.logError(_("Please enter your zevera.com account or deactivate this plugin"))
- # self.fail("No zevera.com account provided")
- #
- # self.logDebug("zevera.com: Old URL: %s" % pyfile.url)
- #
- # last_size = retries = 0
- # olink = pyfile.url #quote(pyfile.url.encode('utf_8'))
- #
- # for _ in xrange(100):
- # self.retData = self.account.loadAPIRequest(self.req, cmd = 'download_request', olink = olink)
- # self.checkAPIErrors(self.retData)
- #
- # if self.retData['FileInfo']['StatusID'] == 100:
- # break
- # elif self.retData['FileInfo']['StatusID'] == 99:
- # self.fail('Failed to initialize download (99)')
- # else:
- # if self.retData['FileInfo']['Progress']['BytesReceived'] <= last_size:
- # if retries >= 6:
- # self.fail('Failed to initialize download (%d)' % self.retData['FileInfo']['StatusID'] )
- # retries += 1
- # else:
- # retries = 0
- #
- # last_size = self.retData['FileInfo']['Progress']['BytesReceived']
- #
- # self.setWait(self.retData['Update_Wait'])
- # self.wait()
- #
- # pyfile.name = self.retData['FileInfo']['RealFileName']
- # pyfile.size = self.retData['FileInfo']['FileSizeInBytes']
- #
- # self.retData = self.account.loadAPIRequest(self.req, cmd = 'download_start',
- # FileID = self.retData['FileInfo']['FileID'])
- # self.checkAPIErrors(self.retData)
- #
- # self.download(self.api_url, get = {
- # 'cmd': "open_stream",
- # 'login': self.account.loginname,
- # 'pass': self.account.password,
- # 'FileID': self.retData['FileInfo']['FileID'],
- # 'startBytes': 0
- # }
- # )
- #
- # def checkAPIErrors(self, retData):
- # if not retData:
- # self.fail('Unknown API response')
- #
- # if retData['ErrorCode']:
- # self.logError(retData['ErrorCode'], retData['ErrorMessage'])
- # #self.fail('ERROR: ' + retData['ErrorMessage'])
- #
- # if pyfile.size / 1024000 > retData['AccountInfo']['AvailableTODAYTrafficForUseInMBytes']:
- # self.logWarning("Not enough data left to download the file")
- #
- # def crazyDecode(self, ustring):
- # # accepts decoded ie. unicode string - API response is double-quoted, double-utf8-encoded
- # # no idea what the proper order of calling these functions would be :-/
- # return html_unescape(unquote(unquote(ustring.replace(
- # '@DELIMITER@','#'))).encode('raw_unicode_escape').decode('utf-8'))