diff options
author | Stefano <l.stickell@yahoo.it> | 2013-10-23 13:03:37 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-10-23 13:03:37 +0200 |
commit | 29a62c4b9886d31bfa4b5e70db44eb59330bbe28 (patch) | |
tree | 47bb81dfb3eba95944dbf1efeb1096477cad8c4e /module | |
parent | NCryptIn: better folder name detect (diff) | |
parent | Hosters: replaced line continuation with brackets (diff) | |
download | pyload-29a62c4b9886d31bfa4b5e70db44eb59330bbe28.tar.xz |
Merge pull request #331 from vuolter/s/hoster_lc
Hosters: replace line continuation with brackets
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/WindowsPhoneToastNotify.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/FileApeCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/FreakshareCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/MegasharesCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/PornhostCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/PutlockerCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/RapidgatorNet.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 7 | ||||
-rw-r--r-- | 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 = "<?xml version='1.0' encoding='utf-8'?> <wp:Notification xmlns:wp='WPNotification'> " \ - "<wp:Toast> <wp:Text1>Pyload Mobile</wp:Text1> <wp:Text2>Captcha waiting!</wp:Text2> " \ - "</wp:Toast> </wp:Notification>" + myxml = ("<?xml version='1.0' encoding='utf-8'?> <wp:Notification xmlns:wp='WPNotification'> " + "<wp:Toast> <wp:Text1>Pyload Mobile</wp:Text1> <wp:Text2>Captcha waiting!</wp:Text2> " + "</wp:Toast> </wp:Notification>") 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"<div style=\"text-align:center; font-size: 30px;\"><a href=\"(http://.*?)\"", self.html) + linkMatch = re.search(r"<div style=\"text-align:center; font-size: 30px;\"><a href=\"(http://.*?)\"", self.html) + if not linkMatch: linkMatch = re.search(r"\"(http://tx\d+\.fileape\.com/[a-z]+/.*?)\"", self.html) if linkMatch: diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index 5a42d1a47..cb84a468a 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -165,7 +165,7 @@ class FreakshareCom(Hoster): if challenge: re_captcha = ReCaptcha(self) - request_options["recaptcha_challenge_field"], request_options["recaptcha_response_field"] \ - = re_captcha.challenge(challenge.group(1)) + (request_options["recaptcha_challenge_field"], + request_options["recaptcha_response_field"]) = re_captcha.challenge(challenge.group(1)) return request_options diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py index 4e43d4a00..134c44334 100644 --- a/module/plugins/hoster/MegasharesCom.py +++ b/module/plugins/hoster/MegasharesCom.py @@ -70,9 +70,9 @@ class MegasharesCom(SimpleHoster): "http://d01.megashares.com/index.php?secgfx=gfx&random_num=%s" % random_num) self.logInfo("Reactivating passport %s: %s %s" % (passport_num, random_num, verifyinput)) - url = "http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri + \ - "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) + \ - "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000)) + url = ("http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri + + "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) + + "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000)) self.logDebug(url) response = self.load(url) diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py index d443c6a0a..1d340694b 100644 --- a/module/plugins/hoster/PornhostCom.py +++ b/module/plugins/hoster/PornhostCom.py @@ -68,8 +68,8 @@ class PornhostCom(Hoster): if self.html is None: self.download_html() - if re.search(r'gallery not found', self.html) is not None \ - or re.search(r'You will be redirected to', self.html) is not None: + if (re.search(r'gallery not found', self.html) is not None or + re.search(r'You will be redirected to', self.html) is not None): return False else: return True diff --git a/module/plugins/hoster/PutlockerCom.py b/module/plugins/hoster/PutlockerCom.py index 0b049b28d..80d836655 100644 --- a/module/plugins/hoster/PutlockerCom.py +++ b/module/plugins/hoster/PutlockerCom.py @@ -55,8 +55,8 @@ class PutlockerCom(SimpleHoster): post_data = {"hash": hash_data.group(1), "confirm": "Continue+as+Free+User"} self.html = self.load(self.pyfile.url, post=post_data) - 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: + 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 |