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/Keep2shareCC.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/Keep2shareCC.py') diff --git a/module/plugins/hoster/Keep2shareCC.py b/module/plugins/hoster/Keep2shareCC.py index e9f294087..74dc05b89 100644 --- a/module/plugins/hoster/Keep2shareCC.py +++ b/module/plugins/hoster/Keep2shareCC.py @@ -37,11 +37,12 @@ class Keep2shareCC(SimpleHoster): FILE_SIZE_PATTERN = r'Size: (?P[^<]+)' OFFLINE_PATTERN = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404' - DIRECT_LINK_PATTERN = r'To download this file with slow speed, use this link' + LINK_PATTERN = r'To download this file with slow speed, use this link' WAIT_PATTERN = r'Please wait ([\d:]+) to download this file' ALREADY_DOWNLOADING_PATTERN = r'Free account does not allow to download more than one file at the same time' - RECAPTCHA_KEY = '6LcYcN0SAAAAABtMlxKj7X0hRxOY8_2U86kI1vbb' + RECAPTCHA_KEY = "6LcYcN0SAAAAABtMlxKj7X0hRxOY8_2U86kI1vbb" + def handleFree(self): self.sanitize_url() @@ -76,7 +77,7 @@ class Keep2shareCC(SimpleHoster): self.wait(30 * 60, reconnect=True) self.retry() - m = re.search(self.DIRECT_LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.html) if not m: self.parseError("Unable to detect direct link") self.startDownload(m.group(1)) -- cgit v1.2.3