From eca20b701c411046e7ededb0462b310124ce3c18 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 13 Apr 2015 10:21:32 +0200 Subject: Cleanup + fixup + new lib --- module/plugins/hoster/LolabitsEs.py | 48 ------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 module/plugins/hoster/LolabitsEs.py (limited to 'module/plugins/hoster/LolabitsEs.py') diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py deleted file mode 100644 index 61df5f0bb..000000000 --- a/module/plugins/hoster/LolabitsEs.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -* - -import HTMLParser -import re - -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class LolabitsEs(SimpleHoster): - __name__ = "LolabitsEs" - __type__ = "hoster" - __version__ = "0.02" - - __pattern__ = r'https?://(?:www\.)?lolabits\.es/.+' - - __description__ = """Lolabits.es hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - - - NAME_PATTERN = r'Descargar: (?P.+?)<' - SIZE_PATTERN = r'class="fileSize">(?P[\d.,]+) (?P[\w^_]+)' - OFFLINE_PATTERN = r'Un usuario con este nombre no existe' - - FILEID_PATTERN = r'name="FileId" value="(\d+)"' - TOKEN_PATTERN = r'name="__RequestVerificationToken" type="hidden" value="(.+?)"' - LINK_PATTERN = r'"redirectUrl":"(.+?)"' - - - def setup(self): - self.chunkLimit = 1 - - - def handleFree(self, pyfile): - fileid = re.search(self.FILEID_PATTERN, self.html).group(1) - self.logDebug("FileID: " + fileid) - - token = re.search(self.TOKEN_PATTERN, self.html).group(1) - self.logDebug("Token: " + token) - - self.html = self.load("http://lolabits.es/action/License/Download", - post={'fileId' : fileid, - '__RequestVerificationToken' : token}).decode('unicode-escape') - - self.link = HTMLParser.HTMLParser().unescape(re.search(self.LINK_PATTERN, self.html).group(1)) - - -getInfo = create_getInfo(LolabitsEs) -- cgit v1.2.3