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/ShareRapidCom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/ShareRapidCom.py') diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py index aca7e995b..dad75ae74 100644 --- a/module/plugins/hoster/ShareRapidCom.py +++ b/module/plugins/hoster/ShareRapidCom.py @@ -32,11 +32,12 @@ class ShareRapidCom(SimpleHoster): FILE_SIZE_PATTERN = r'Velikost:\s*\s*(?P[0-9.]+) (?P[kKMG])i?B' OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' - DOWNLOAD_URL_PATTERN = r'([^<]+)' + FILE_URL_REPLACEMENTS = [(__pattern__, r'http://share-rapid.com/stahuj/\g')] + + LINK_PATTERN = r'([^<]+)' ERR_LOGIN_PATTERN = ur'
Stahování je přístupné pouze přihlášeným uživatelům' ERR_CREDIT_PATTERN = ur'
Stahování zdarma je možné jen přes náš' - FILE_URL_REPLACEMENTS = [(__pattern__, r'http://share-rapid.com/stahuj/\g')] def setup(self): self.chunkLimit = 1 @@ -54,7 +55,7 @@ class ShareRapidCom(SimpleHoster): self.getFileInfo() - found = re.search(self.DOWNLOAD_URL_PATTERN, self.html) + found = re.search(self.LINK_PATTERN, self.html) if found: link = found.group(1) self.logDebug("Premium link: %s" % link) -- cgit v1.2.3