diff options
author | GamaC0de <nitzo2001@yahoo.com> | 2016-06-08 21:24:25 +0200 |
---|---|---|
committer | GamaC0de <nitzo2001@yahoo.com> | 2016-06-08 21:24:25 +0200 |
commit | 3fa1f23039cd64a71f5eacf6cfa8988c947ec32c (patch) | |
tree | 574d355f6a9731da8c4048f0f0dd695aea55a02c | |
parent | Merge pull request #2495 from OndrejIT/stable (diff) | |
download | pyload-3fa1f23039cd64a71f5eacf6cfa8988c947ec32c.tar.xz |
[FilefactoryCom] Fix #2498
-rw-r--r-- | module/plugins/accounts/FilefactoryCom.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index 5be4f3cf6..527acbd82 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -11,13 +11,14 @@ from module.plugins.internal.Account import Account class FilefactoryCom(Account): __name__ = "FilefactoryCom" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __status__ = "testing" __description__ = """Filefactory.com account plugin""" __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it")] + __authors__ = [("zoidberg", "zoidberg@mujmail.cz" ), + ("stickell", "l.stickell@yahoo.it" ), + ("GammaC0de", "nitzo2001[AT]yahoo[DOT]com")] VALID_UNTIL_PATTERN = r'Premium valid until: <strong>(?P<D>\d{1,2})\w{1,2} (?P<M>\w{3}), (?P<Y>\d{4})</strong>' @@ -31,6 +32,7 @@ class FilefactoryCom(Account): premium = True validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<D> \g<M> \g<Y>', m.group(0)) validuntil = time.mktime(time.strptime(validuntil, "%d %b %Y")) + else: premium = False validuntil = -1 @@ -39,12 +41,14 @@ class FilefactoryCom(Account): def signin(self, user, password, data): - self.req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php") + html = self.load("https://www.filefactory.com/member/signin.php") + if "/member/signout.php" in html: + self.skip_login() html = self.load("https://www.filefactory.com/member/signin.php", post={'loginEmail' : user, 'loginPassword': password, 'Submit' : "Sign In"}) - if self.req.lastEffectiveURL != "http://www.filefactory.com/account/": + if "/member/signout.php" not in html: self.fail_login() |