From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/RapidgatorNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/RapidgatorNet.py') diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index d3399722e..b15201522 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -37,7 +37,7 @@ class RapidgatorNet(SimpleHoster): __author_name__ = ("zoidberg", "chrox", "stickell", "Walter Purcaro") __author_mail__ = ("zoidberg@mujmail.cz", "", "l.stickell@yahoo.it", "vuolter@gmail.com") - API_URL = 'http://rapidgator.net/api/file' + API_URL = "http://rapidgator.net/api/file" FILE_NAME_PATTERN = r'Download file (?P<N>.*)' FILE_SIZE_PATTERN = r'File size:\s*(?P[\d\.]+) (?P\w+)' @@ -47,7 +47,7 @@ class RapidgatorNet(SimpleHoster): PREMIUM_ONLY_ERROR_PATTERN = r'You can download files up to|This file can be downloaded by premium only<' DOWNLOAD_LIMIT_ERROR_PATTERN = r'You have reached your (daily|hourly) downloads limit' WAIT_PATTERN = r'(?:Delay between downloads must be not less than|Try again in)\s*(\d+)\s*(hour|min)' - DOWNLOAD_LINK_PATTERN = r"return '(http://\w+.rapidgator.net/.*)';" + LINK_PATTERN = r"return '(http://\w+.rapidgator.net/.*)';" RECAPTCHA_KEY_PATTERN = r'"http://api\.recaptcha\.net/challenge\?k=(.*?)"' ADSCAPTCHA_SRC_PATTERN = r'(http://api\.adscaptcha\.com/Get\.aspx[^"\']*)' @@ -128,7 +128,7 @@ class RapidgatorNet(SimpleHoster): self.html = self.load(url) for _ in xrange(5): - found = re.search(self.DOWNLOAD_LINK_PATTERN, self.html) + found = re.search(self.LINK_PATTERN, self.html) if found: link = found.group(1) self.logDebug(link) -- cgit v1.2.3