diff options
Diffstat (limited to 'module/plugins/hoster')
23 files changed, 34 insertions, 37 deletions
| diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index c5dd9b707..734c6b583 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -84,6 +84,6 @@ class AlldebridCom(Hoster):                                      'empty': re.compile(r"^$")})          if check == "error": -            self.retry(wait_time=60, reason="An error occured while generating link") +            self.retry(wait_time=60, reason=_("An error occured while generating link"))          elif check == "empty": -            self.retry(wait_time=60, reason="Downloaded File was empty") +            self.retry(wait_time=60, reason=_("Downloaded File was empty")) diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index e5cf69914..fdbf0464a 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -58,7 +58,7 @@ class CatShareNet(SimpleHoster):          m = re.search(self.LINK_PATTERN, self.html)          if m is None:              self.invalidCaptcha() -            self.retry(reason="Wrong captcha entered") +            self.retry(reason=_("Wrong captcha entered"))          dl_link = m.group(1)          self.download(dl_link, disposition=True) diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 5396a7826..91c3877f8 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -58,7 +58,7 @@ class CzshareCom(SimpleHoster):                  return False          except Exception, e:              # let's continue and see what happens... -            self.logError(repr(e)) +            self.logError(str(e))          return True @@ -69,7 +69,7 @@ class CzshareCom(SimpleHoster):              form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1)              inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form))          except Exception, e: -            self.logError(repr(e)) +            self.logError(str(e))              self.resetAccount()          # download the file, destination is determined by pyLoad diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 3fad62693..efe9327b9 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -35,7 +35,7 @@ class EuroshareEu(SimpleHoster):      def handlePremium(self):          if self.ERR_NOT_LOGGED_IN_PATTERN in self.html:              self.account.relogin(self.user) -            self.retry(reason="User not logged in") +            self.retry(reason=_("User not logged in"))          self.download(self.pyfile.url.rstrip('/') + "/download/") @@ -43,7 +43,7 @@ class EuroshareEu(SimpleHoster):                                      "json": re.compile(r'\{"status":"error".*?"message":"(.*?)"')})          if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"):              self.account.relogin(self.user) -            self.retry(reason="Access token expired") +            self.retry(reason=_("Access token expired"))          elif check == "json":              self.fail(self.lastCheck.group(1)) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index cb6c44eb7..eddcd2fe6 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -68,6 +68,6 @@ class FastixRu(Hoster):                                      "empty": re.compile(r"^$")})          if check == "error": -            self.retry(wait_time=60, reason="An error occurred while generating link") +            self.retry(wait_time=60, reason=_("An error occurred while generating link"))          elif check == "empty": -            self.retry(wait_time=60, reason="Downloaded File was empty") +            self.retry(wait_time=60, reason=_("Downloaded File was empty")) diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index a07f741fa..f15d95ad5 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -58,7 +58,7 @@ class FastshareCz(SimpleHoster):          if check == "paralell_dl":              self.retry(6, 10 * 60, "Paralell download")          elif check == "wrong_captcha": -            self.retry(max_tries=5, reason="Wrong captcha") +            self.retry(max_tries=5, reason=_("Wrong captcha"))      def handlePremium(self): diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 8f314f059..4cb816724 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -92,13 +92,13 @@ class FileSharkPl(SimpleHoster):          action, inputs = self.parseHtmlForm('action=""')          m = re.search(self.CAPTCHA_TOKEN_PATTERN, self.html)          if m is None: -            self.retry(reason="Captcha form not found") +            self.retry(reason=_("Captcha form not found"))          inputs['form[_token]'] = m.group(1)          m = re.search(self.CAPTCHA_IMG_PATTERN, self.html)          if m is None: -            self.retry(reason="Captcha image not found") +            self.retry(reason=_("Captcha image not found"))          tmp_load = self.load          self.load = self.decode64  #: injects decode64 inside decryptCaptcha @@ -124,7 +124,7 @@ class FileSharkPl(SimpleHoster):          elif check == "wrong_captcha":              self.invalidCaptcha() -            self.retry(10, 1, reason="Wrong captcha solution") +            self.retry(10, 1, reason=_("Wrong captcha solution"))          elif check == "wait_pattern":              self.retry() diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 068724488..c2d18160a 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -66,7 +66,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.error(_("Unknown error")) diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 9a34f8872..30df70a82 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -35,7 +35,7 @@ class FilerNet(SimpleHoster):          # Wait between downloads          m = re.search(r'musst du <span id="time">(\d+)</span> Sekunden warten', self.html)          if m: -            self.retry(wait_time=int(m.group(1)), reason="Wait between free downloads") +            self.retry(wait_time=int(m.group(1)), reason=_("Wait between free downloads"))          self.html = self.load(self.pyfile.url, decode=True) diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 9fded2dd8..d11f631c2 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -92,7 +92,7 @@ class FileserveCom(Hoster):              elif action['fail'] == "parallelDownload":                  self.logWarning(_("Parallel download error, now waiting 60s")) -                self.retry(wait_time=60, reason="parallelDownload") +                self.retry(wait_time=60, reason=_("parallelDownload"))              else:                  self.fail(_("Download check returned: %s") % action['fail']) diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index 529b107d3..35c7aa253 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -172,9 +172,6 @@ class FreakshareCom(Hoster):          to_sort = re.findall(r"<input\stype=\".*?\"\svalue=\"(\S*?)\".*?name=\"(\S*?)\"\s.*?\/>", herewego)          request_options = dict((n, v) for (v, n) in to_sort) -        # comment this in, when it doesnt work as well -        #print "\n\n%s\n\n" % ";".join(["%s=%s" % x for x in to_sort]) -          challenge = re.search(r"http://api\.recaptcha\.net/challenge\?k=(\w+)", herewego)          if challenge: diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py index 512f55686..b7d4632b6 100644 --- a/module/plugins/hoster/LinksnappyCom.py +++ b/module/plugins/hoster/LinksnappyCom.py @@ -67,7 +67,7 @@ class LinksnappyCom(Hoster):          check = self.checkDownload({"html302": "<title>302 Found</title>"})          if check == "html302": -            self.retry(wait_time=5, reason="Linksnappy returns only HTML data") +            self.retry(wait_time=5, reason=_("Linksnappy returns only HTML data"))      @staticmethod diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 8ae56458b..4917bebfb 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -35,7 +35,7 @@ class LuckyShareNet(SimpleHoster):              else:                  self.error(_("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) diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index 61c3ab425..629d42109 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -64,7 +64,7 @@ class MegaRapidCz(SimpleHoster):          else:              if re.search(self.ERR_LOGIN_PATTERN, self.html):                  self.relogin(self.user) -                self.retry(wait_time=60, reason="User login failed") +                self.retry(wait_time=60, reason=_("User login failed"))              elif re.search(self.ERR_CREDIT_PATTERN, self.html):                  self.fail(_("Not enough credit left"))              else: diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py index 9f21ce868..3d575b588 100644 --- a/module/plugins/hoster/MegasharesCom.py +++ b/module/plugins/hoster/MegasharesCom.py @@ -78,7 +78,7 @@ class MegasharesCom(SimpleHoster):              time = [int(x) for x in m.groups()]              renew = time[0] + (time[1] * 60) + (time[2] * 60)              self.logDebug("Waiting %d seconds for a new passport" % renew) -            self.retry(wait_time=renew, reason="Passport renewal") +            self.retry(wait_time=renew, reason=_("Passport renewal"))          # Check traffic left on passport          m = re.search(self.PASSPORT_LEFT_PATTERN, self.html, re.M | re.S) @@ -90,7 +90,7 @@ class MegasharesCom(SimpleHoster):          self.logInfo(_("Data left: %s %s (%d MB needed)") % (m.group(2), m.group(3), self.pyfile.size / 1048576))          if not data_left: -            self.retry(wait_time=600, reason="Passport renewal") +            self.retry(wait_time=600, reason=_("Passport renewal"))          self.handleDownload(False) diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 2d4773bac..2f0c6e2a8 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -26,10 +26,11 @@ def getInfo(urls):          api = getURL(apiurl + ids, decode=True)          if api is None or len(api) < 10: -            print "Netload prefetch: failed " +            self.logDebug("Prefetch failed")              return          if api.find("unknown_auth") >= 0: -            print "Netload prefetch: Outdated auth code " +            print +            self.logDebug("Outdated auth code")              return          result = [] @@ -43,8 +44,7 @@ def getInfo(urls):                      size = 0                  result.append((tmp[1], size, 2 if tmp[3] == "online" else 1, chunk[i]))              except: -                print "Netload prefetch: Error while processing response: " -                print r +                self.logDebug("Error while processing response: %s" % r)          yield result diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index 57c35e1ac..345d130c1 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -140,6 +140,6 @@ class OboomCom(Hoster):              self.downloadDomain = result[1]              self.downloadTicket = result[2]          elif result[0] == 421: -            self.retry(wait_time=result[2] + 60, reason="Connection limit exceeded") +            self.retry(wait_time=result[2] + 60, reason=_("Connection limit exceeded"))          else:              self.fail(_("Could not retrieve download ticket. Error code: %s") % result[0]) diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py index 6ebfbfdbe..436e3b65a 100644 --- a/module/plugins/hoster/OverLoadMe.py +++ b/module/plugins/hoster/OverLoadMe.py @@ -81,4 +81,4 @@ class OverLoadMe(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(reason=_("An error occured while generating link."), wait_time=60) diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 8db84340b..591537ae4 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -67,7 +67,7 @@ class RapidgatorNet(SimpleHoster):              status = json['response_status']              msg = json['response_details']          except BadHeader, e: -            self.logError("API: %s" % cmd, repr(e), "SID: %s" % self.sid) +            self.logError("API: %s" % cmd, str(e), "SID: %s" % self.sid)              status = e.code              msg = e diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index dd4101402..161eb18df 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -90,4 +90,4 @@ class RealdebridCom(Hoster):          if check == "error":              #usual this download can safely be retried -            self.retry(wait_time=60, reason="An error occured while generating link") +            self.retry(wait_time=60, reason=_("An error occured while generating link")) diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 43398772c..487a89d2c 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -147,7 +147,7 @@ class UlozTo(SimpleHoster):              #self.delStorage("captcha_id")              #self.delStorage("captcha_text")              self.invalidCaptcha() -            self.retry(reason="Wrong captcha code") +            self.retry(reason=_("Wrong captcha code"))          elif check == "offline":              self.offline()          elif check == "passwd": diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index e6ec0eb12..8a4af51b4 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -139,6 +139,7 @@ class UploadedTo(Hoster):                  pyfile.name, pyfile.size = name, size              else:                  self.error(_("file info")) +          elif api == 'Access denied':              self.fail(_("API key invalid")) @@ -171,9 +172,9 @@ class UploadedTo(Hoster):              self.fail(_("Traffic exceeded"))          header = self.load("http://uploaded.net/file/%s" % self.fileID, just_header=True) -        if "location" in header: +        if 'location' in header:              #Direct download -            print "Direct Download: " + header['location'] +            self.logDebug("Direct download link detected")              self.download(header['location'])          else:              #Indirect download @@ -182,7 +183,6 @@ class UploadedTo(Hoster):              if m is None:                  self.fail(_("Download URL not m. Try to enable direct downloads"))              url = m.group(1) -            print "Premium URL: " + url              self.download(url, post={}) diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py index ad99793e4..921a9c205 100644 --- a/module/plugins/hoster/VeehdCom.py +++ b/module/plugins/hoster/VeehdCom.py @@ -35,7 +35,7 @@ class VeehdCom(Hoster):      def download_html(self):          url = self.pyfile.url -        self.logDebug("Requesting page: %s" % repr(url)) +        self.logDebug("Requesting page: %s" % url)          self.html = self.load(url) | 
