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/HellshareCz.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'module/plugins/hoster/HellshareCz.py') diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index c969d3285..cc8341f8e 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -18,30 +18,22 @@ import re import datetime -from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from math import ceil +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.network.RequestFactory import getURL -def getInfo(urls): - result = [] - - for url in urls: - file_info = parseFileInfo(HellshareCz, url, getURL(url, decode=True)) - result.append(file_info) - - yield result - class HellshareCz(SimpleHoster): __name__ = "HellshareCz" __type__ = "hoster" __pattern__ = r"(http://(?:.*\.)*hellshare\.(?:cz|com|sk|hu)/[^?]*/\d+).*" - __version__ = "0.75" + __version__ = "0.76" __description__ = """Hellshare.cz""" __author_name__ = ("zoidberg") FREE_URL_PATTERN = r']*action="(http://free\d*\.helldata[^"]*)"' PREMIUM_URL_PATTERN = r"launchFullDownload\('([^']*)'\);" - FILE_NAME_PATTERN = r'

([^<]+)

' - FILE_SIZE_PATTERN = r'Size\s*([0-9.]*) (kB|KB|MB|GB)' + FILE_NAME_PATTERN = r'

(?P[^<]+)

' + FILE_SIZE_PATTERN = r'Size\s*(?P[0-9.]*) (?P[kKMG])i?B' FILE_OFFLINE_PATTERN = r'

File not found.

' CAPTCHA_PATTERN = r'' #FILE_CREDITS_PATTERN = r'(\d+) MB' @@ -128,4 +120,6 @@ class HellshareCz(SimpleHoster): self.download(download_url) info = self.account.getAccountInfo(self.user, True) - self.logInfo("User %s has %i credits left" % (self.user, info["trafficleft"] / 1024)) \ No newline at end of file + self.logInfo("User %s has %i credits left" % (self.user, info["trafficleft"] / 1024)) + +getInfo = create_getInfo(HellshareCz) \ No newline at end of file -- cgit v1.2.3