From af87e72bafb7019d8c1fd705b13bb26369c47665 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 14 May 2013 14:03:17 +0200 Subject: FastshareCz: fixed account login and info retrieve fixes #110 --- module/plugins/accounts/FastshareCz.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 333ee3761..d7886f437 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -23,16 +23,16 @@ from module.utils import parseFileSize class FastshareCz(Account): __name__ = "FastshareCz" - __version__ = "0.01" + __version__ = "0.02" __type__ = "account" __description__ = """fastshare.cz account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") + __author_name__ = ("zoidberg" , "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") def loadAccountInfo(self, user, req): html = req.load("http://www.fastshare.cz/user", decode = True) - found = re.search(r'Kredit: (.+?) ', html) + found = re.search(r'(?:Kredit|Credit)\s*: (.+?) ', html) if found: trafficleft = parseFileSize(found.group(1)) / 1024 premium = True if trafficleft else False @@ -43,6 +43,7 @@ class FastshareCz(Account): return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium} def login(self, user, data, req): + req.load('http://www.fastshare.cz/login') # Do not remove or it will not login html = req.load('http://www.fastshare.cz/sql.php', post = { "heslo": data['password'], "login": user -- cgit v1.2.3