From bd69cce998b00cabeb253f8eb02307aff9339385 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Thu, 23 Aug 2012 20:45:43 +0200 Subject: update ryushare.com - thx trance4us --- module/plugins/accounts/RyushareCom.py | 13 +++++++++---- module/plugins/internal/XFSPAccount.py | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/module/plugins/accounts/RyushareCom.py b/module/plugins/accounts/RyushareCom.py index 8eb0d3571..055680ea0 100644 --- a/module/plugins/accounts/RyushareCom.py +++ b/module/plugins/accounts/RyushareCom.py @@ -3,10 +3,15 @@ from module.plugins.internal.XFSPAccount import XFSPAccount class RyushareCom(XFSPAccount): __name__ = "RyushareCom" - __version__ = "0.01" + __version__ = "0.02" __type__ = "account" __description__ = """ryushare.com account plugin""" - __author_name__ = ("zoidberg") - __author_mail__ = ("zoidberg@mujmail.cz") + __author_name__ = ("zoidberg", "trance4us") + __author_mail__ = ("zoidberg@mujmail.cz", "") - MAIN_PAGE = "http://ryushare.com/" \ No newline at end of file + MAIN_PAGE = "http://ryushare.com/" + + def login(self, user, data, req): + html = req.load("http://ryushare.com/login.python", post={"login": user, "password": data["password"], "op": "login"}) + if 'Incorrect Login or Password' in html or '>Error<' in html: + self.wrongPassword() \ No newline at end of file diff --git a/module/plugins/internal/XFSPAccount.py b/module/plugins/internal/XFSPAccount.py index c41dbb3a9..ad25ad2c8 100644 --- a/module/plugins/internal/XFSPAccount.py +++ b/module/plugins/internal/XFSPAccount.py @@ -25,16 +25,16 @@ from module.utils import parseFileSize class XFSPAccount(Account): __name__ = "XFSPAccount" - __version__ = "0.04" + __version__ = "0.05" __type__ = "account" __description__ = """XFileSharingPro account base""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") MAIN_PAGE = None - - VALID_UNTIL_PATTERN = r'Premium account expire:([^<]+)' - TRAFFIC_LEFT_PATTERN = r'Traffic available today:(?P[^<]+)' + + VALID_UNTIL_PATTERN = r'>Premium account expire:([^<]+)' + TRAFFIC_LEFT_PATTERN = r'>Traffic available today:([^<]+)' def loadAccountInfo(self, user, req): html = req.load(self.MAIN_PAGE + "?op=my_account", decode = True) -- cgit v1.2.3