From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/FilefactoryCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/FilefactoryCom.py') diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index 69b1a7d7e..0bb814039 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account class FilefactoryCom(Account): __name__ = "FilefactoryCom" __type__ = "account" - __version__ = "0.18" + __version__ = "0.19" __status__ = "testing" __description__ = """Filefactory.com account plugin""" @@ -22,7 +22,7 @@ class FilefactoryCom(Account): VALID_UNTIL_PATTERN = r'Premium valid until: (?P\d{1,2})\w{1,2} (?P\w{3}), (?P\d{4})' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("http://www.filefactory.com/account/") m = re.search(self.VALID_UNTIL_PATTERN, html) @@ -37,13 +37,13 @@ class FilefactoryCom(Account): return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - def login(self, user, password, data, req): - req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php") + 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", post={'loginEmail' : user, 'loginPassword': password, 'Submit' : "Sign In"}) - if req.lastEffectiveURL != "http://www.filefactory.com/account/": + if self.req.lastEffectiveURL != "http://www.filefactory.com/account/": self.fail_login() -- cgit v1.2.3