From 9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Tue, 22 Nov 2011 00:26:08 +0100 Subject: fix filepost (#431), hellspy, ifolder, letitbit, change SimpleHoster patterns --- module/plugins/hoster/IfileIt.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'module/plugins/hoster/IfileIt.py') diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py index 3bc60220a..b0e60d25a 100644 --- a/module/plugins/hoster/IfileIt.py +++ b/module/plugins/hoster/IfileIt.py @@ -17,25 +17,16 @@ """ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.common.json_layer import json_loads from module.plugins.ReCaptcha import ReCaptcha from module.network.RequestFactory import getURL -def getInfo(urls): - result = [] - - for url in urls: - file_info = parseFileInfo(IfileIt, url, getURL(url, decode=True)) - result.append(file_info) - - yield result - class IfileIt(SimpleHoster): __name__ = "IfileIt" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*ifile\.it/(\w+).*" - __version__ = "0.22" + __version__ = "0.23" __description__ = """Ifile.it""" __author_name__ = ("zoidberg") @@ -43,7 +34,7 @@ class IfileIt(SimpleHoster): #DEC_PATTERN = r"requestBtn_clickEvent[^}]*url:\s*([^,]+)" DOWNLOAD_LINK_PATTERN = r' If it doesn\'t, ' RECAPTCHA_KEY_PATTERN = r"var __recaptcha_public\s*=\s*'([^']+)';" - FILE_INFO_PATTERN = r']*>\s*(?P.*?)\s* \s*\s*(?P[0-9.]+)\s*(?P[kKMG])i?B\s*\s*' FILE_OFFLINE_PATTERN = r'$\("#errorPnl"\)\.empty\(\)\.append\( "no such file" \);' def handleFree(self): @@ -79,4 +70,6 @@ class IfileIt(SimpleHoster): self.html = self.load(self.pyfile.url) download_url = re.search(self.DOWNLOAD_LINK_PATTERN, self.html).group(1) - self.download(download_url) \ No newline at end of file + self.download(download_url) + +getInfo = create_getInfo(IfileIt) \ No newline at end of file -- cgit v1.2.3