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/TwoSharedCom.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/TwoSharedCom.py') diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index bb9737d2e..74a9dbe08 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -17,13 +17,15 @@ class TwoSharedCom(SimpleHoster): FILE_NAME_PATTERN = r'

(?P.*)

' FILE_SIZE_PATTERN = r'File size:\s*(?P[0-9,.]+) (?P[kKMG])i?B' OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' - DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" + + LINK_PATTERN = r"window.location ='([^']+)';" + def setup(self): self.resumeDownload = self.multiDL = True def handleFree(self): - found = re.search(self.DOWNLOAD_URL_PATTERN, self.html) + found = re.search(self.LINK_PATTERN, self.html) if not found: self.parseError('Download link') link = found.group(1) -- cgit v1.2.3