diff options
author | 2015-09-29 20:05:07 +0200 | |
---|---|---|
committer | 2015-09-29 20:05:07 +0200 | |
commit | ec6e5dc7fcdcefee10e37d22473c9accae1104cf (patch) | |
tree | d19824c0223b083d5b4256530443165cfabb7a04 /module/plugins/accounts/HellshareCz.py | |
parent | Merge pull request #1850 from chaosblog/patch-2 (diff) | |
download | pyload-ec6e5dc7fcdcefee10e37d22473c9accae1104cf.tar.xz |
Account class completely rewritten + plugins updated
Diffstat (limited to 'module/plugins/accounts/HellshareCz.py')
-rw-r--r-- | module/plugins/accounts/HellshareCz.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index 7dbc828a0..3031c26b6 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class HellshareCz(Account): __name__ = "HellshareCz" __type__ = "account" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __description__ = """Hellshare.cz account plugin""" @@ -20,7 +20,7 @@ class HellshareCz(Account): CREDIT_LEFT_PATTERN = r'<div class="credit-link">\s*<table>\s*<tr>\s*<th>(\d+|\d\d\.\d\d\.)</th>' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): self.relogin(user) html = self.load("http://www.hellshare.com/") @@ -53,13 +53,13 @@ class HellshareCz(Account): return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load('http://www.hellshare.com/') - if req.lastEffectiveURL != 'http://www.hellshare.com/': + if self.req.lastEffectiveURL != 'http://www.hellshare.com/': #: Switch to English - self.log_debug("Switch lang - URL: %s" % req.lastEffectiveURL) + self.log_debug("Switch lang - URL: %s" % self.req.lastEffectiveURL) - json = self.load("%s?do=locRouter-show" % req.lastEffectiveURL) + json = self.load("%s?do=locRouter-show" % self.req.lastEffectiveURL) hash = re.search(r"(\-\-[0-9a-f]+\-)", json).group(1) self.log_debug("Switch lang - HASH: %s" % hash) |