From d32cc1306b06ad7da09124d2497815128d2af9a5 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 14 May 2013 12:14:35 +0200 Subject: FilefactoryCom: fixed handlePremium http://forum.pyload.org/viewtopic.php?f=7&t=2572 --- module/plugins/hoster/FilefactoryCom.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index aebf0f38d..bb11ee9e8 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -57,11 +57,13 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r"https?://(?:www\.)?filefactory\.com/file/(?P[a-zA-Z0-9]+)" - __version__ = "0.39" + __version__ = "0.40" __description__ = """Filefactory.Com File Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") + DIRECT_LINK_PATTERN = r'' + def process(self, pyfile): if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): self.handlePremium() @@ -115,7 +117,12 @@ class FilefactoryCom(SimpleHoster): elif 'content-disposition' in header: url = self.pyfile.url else: - self.parseError('Unable to detect premium direct link') + html = self.load(self.pyfile.url) + found = re.search(self.DIRECT_LINK_PATTERN, html) + if found: + url = found.group(1) + else: + self.parseError('Unable to detect premium direct link') self.logDebug('DIRECT PREMIUM LINK: ' + url) self.download(url, disposition=True) -- cgit v1.2.3