From ec79ab7187eda441f3c3194b836967049ca23cc9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 16 Oct 2013 15:27:36 +0200 Subject: Hosters: replaced line continuation with brackets --- module/plugins/hooks/WindowsPhoneToastNotify.py | 6 +++--- module/plugins/hoster/FileApeCom.py | 4 ++-- module/plugins/hoster/FreakshareCom.py | 4 ++-- module/plugins/hoster/MegasharesCom.py | 6 +++--- module/plugins/hoster/PornhostCom.py | 4 ++-- module/plugins/hoster/PutlockerCom.py | 4 ++-- module/plugins/hoster/RapidgatorNet.py | 4 ++-- module/plugins/hoster/RapidshareCom.py | 7 +++---- module/plugins/internal/SimpleHoster.py | 4 ++-- 9 files changed, 21 insertions(+), 22 deletions(-) diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 888862575..d110f7896 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -34,9 +34,9 @@ class WindowsPhoneToastNotify(Hook): self.info = {} def getXmlData(self): - myxml = " " \ - " Pyload Mobile Captcha waiting! " \ - " " + myxml = (" " + " Pyload Mobile Captcha waiting! " + " ") return myxml def doRequest(self): diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py index 2ba01f3a0..dcfb4b3ca 100644 --- a/module/plugins/hoster/FileApeCom.py +++ b/module/plugins/hoster/FileApeCom.py @@ -46,8 +46,8 @@ class FileApeCom(Hoster): self.wait() self.html = self.load(continuePage) - linkMatch = \ - re.search(r"
You have exceeded the daily stream limit for your country\\. You can wait until tomorrow" in self.html or \ - "(>This content server has been temporarily disabled for upgrades|Try again soon\\. You can still download it below\\.<)" in self.html: + if (">You have exceeded the daily stream limit for your country\\. You can wait until tomorrow" in self.html or + "(>This content server has been temporarily disabled for upgrades|Try again soon\\. You can still download it below\\.<)" in self.html): self.retry(wait_time=7200, reason="Download limit exceeded or server disabled") # 2 hours wait patterns = (r'(/get_file\.php\?id=[A-Z0-9]+&key=[A-Za-z0-9=]+&original=1)', diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 64ed6a4b3..611d2ba5d 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -97,8 +97,8 @@ class RapidgatorNet(SimpleHoster): self.html = self.load(self.pyfile.url, decode=True) self.getFileInfo() - if "You can download files up to 500 MB in free mode" in self.html \ - or "This file can be downloaded by premium only" in self.html: + if ("You can download files up to 500 MB in free mode" in self.html or + "This file can be downloaded by premium only" in self.html): self.fail("Premium account needed for download") self.checkWait() diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 9d40b867f..9828bf4ce 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -171,8 +171,7 @@ class RapidshareCom(Hoster): elif int(self.api_data["status"]) > 50: self.api_data["status"] = str(int(self.api_data["status"]) - 50) - self.api_data["mirror"] = \ - "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data + self.api_data["mirror"] = "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data def freeWait(self): """downloads html with the important information @@ -195,8 +194,8 @@ class RapidshareCom(Hoster): self.setWait(60) self.logInfo(_("Already downloading from this ip address, waiting 60 seconds")) self.wait() - elif "Too many users downloading from this server right now" in result or \ - "All free download slots are full" in result: + elif ("Too many users downloading from this server right now" in result or + "All free download slots are full" in result): self.setWait(120) self.logInfo(_("RapidShareCom: No free slots")) self.wait() diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 56e9a6a3f..53f2e9f19 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -129,8 +129,8 @@ def create_getInfo(plugin): for url in urls: cj = CookieJar(plugin.__name__) if isinstance(plugin.SH_COOKIES, list): set_cookies(cj, plugin.SH_COOKIES) - file_info = parseFileInfo(plugin, url, getURL(replace_patterns(url, plugin.FILE_URL_REPLACEMENTS), \ - decode = not plugin.SH_BROKEN_ENCODING, cookies = cj)) + file_info = parseFileInfo(plugin, url, getURL(replace_patterns(url, plugin.FILE_URL_REPLACEMENTS), + decode = not plugin.SH_BROKEN_ENCODING, cookies = cj)) yield file_info return getInfo -- cgit v1.2.3