diff options
author | Stefano <l.stickell@yahoo.it> | 2013-05-14 12:14:35 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-05-14 12:14:35 +0200 |
commit | d32cc1306b06ad7da09124d2497815128d2af9a5 (patch) | |
tree | 1b4217b35648f079546875cc855c83caf80b9cec /module/plugins/hoster | |
parent | FilefactoryCom: fixed validuntil parser (diff) | |
download | pyload-d32cc1306b06ad7da09124d2497815128d2af9a5.tar.xz |
FilefactoryCom: fixed handlePremium
http://forum.pyload.org/viewtopic.php?f=7&t=2572
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/FilefactoryCom.py | 11 |
1 files changed, 9 insertions, 2 deletions
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<id>[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'<section id="downloadLink">\s*<p class="textAlignCenter">\s*<a href="([^"]+)">[^<]+</a>\s*</p>\s*</section>' + 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) |