summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-05-14 14:03:17 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-05-14 14:04:49 +0200
commitaf87e72bafb7019d8c1fd705b13bb26369c47665 (patch)
tree3ddbf4915625b3cc8e5e60f4e123ac093cc52661 /module
parentFilefactoryCom: fixed handlePremium (diff)
downloadpyload-af87e72bafb7019d8c1fd705b13bb26369c47665.tar.xz
FastshareCz: fixed account login and info retrieve
fixes #110
Diffstat (limited to 'module')
-rw-r--r--module/plugins/accounts/FastshareCz.py9
1 files changed, 5 insertions, 4 deletions
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: </td><td>(.+?)&nbsp;', html)
+ found = re.search(r'(?:Kredit|Credit)\s*: </td><td>(.+?)&nbsp;', 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