diff options
Diffstat (limited to 'module/plugins/accounts/MegasharesCom.py')
-rw-r--r-- | module/plugins/accounts/MegasharesCom.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py index 125a21699..127ebadc8 100644 --- a/module/plugins/accounts/MegasharesCom.py +++ b/module/plugins/accounts/MegasharesCom.py @@ -7,13 +7,14 @@ from module.plugins.Account import Account class MegasharesCom(Account): - __name__ = "MegasharesCom" - __version__ = "0.02" - __type__ = "account" + __name__ = "MegasharesCom" + __type__ = "account" + __version__ = "0.03" __description__ = """Megashares.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + VALID_UNTIL_PATTERN = r'<p class="premium_info_box">Period Ends: (\w{3} \d{1,2}, \d{4})</p>' @@ -34,13 +35,14 @@ class MegasharesCom(Account): return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} + def login(self, user, data, req): - html = req.load('http://d01.megashares.com/myms_login.php', post={ - "httpref": "", - "myms_login": "Login", - "mymslogin_name": user, - "mymspassword": data['password'] - }, decode=True) + html = req.load('http://d01.megashares.com/myms_login.php', + post={"httpref" : "", + "myms_login" : "Login", + "mymslogin_name": user, + "mymspassword" : data['password']}, + decode=True) if not '<span class="b ml">%s</span>' % user in html: self.wrongPassword() |