From f018466335af1e7e10c0fda4d18042975a3894ec Mon Sep 17 00:00:00 2001 From: Stefano Date: Thu, 16 May 2013 11:39:48 +0200 Subject: FilefactoryCom: fixed bug: premium download fails if the url is not in standard format --- module/plugins/hoster/FilefactoryCom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index bb11ee9e8..fdde1f9d7 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -57,7 +57,7 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __pattern__ = r"https?://(?:www\.)?filefactory\.com/file/(?P[a-zA-Z0-9]+)" - __version__ = "0.40" + __version__ = "0.41" __description__ = """Filefactory.Com File Download Hoster""" __author_name__ = ("stickell") __author_mail__ = ("l.stickell@yahoo.it") @@ -65,6 +65,11 @@ class FilefactoryCom(SimpleHoster): DIRECT_LINK_PATTERN = r'' def process(self, pyfile): + if not re.match(self.__pattern__ + r'/n/.+', pyfile.url): # Not in standard format + header = self.load(pyfile.url, just_header=True) + if 'location' in header: + self.pyfile.url = 'http://www.filefactory.com' + header['location'] + if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): self.handlePremium() else: -- cgit v1.2.3