diff options
Diffstat (limited to 'pyload/plugins/account/HellshareCz.py')
-rw-r--r-- | pyload/plugins/account/HellshareCz.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pyload/plugins/account/HellshareCz.py b/pyload/plugins/account/HellshareCz.py index 1d033e9f3..cd02c8462 100644 --- a/pyload/plugins/account/HellshareCz.py +++ b/pyload/plugins/account/HellshareCz.py @@ -7,12 +7,13 @@ from pyload.plugins.base.Account import Account class HellshareCz(Account): - __name__ = "HellshareCz" - __type__ = "account" + __name__ = "HellshareCz" + __type__ = "account" __version__ = "0.14" __description__ = """Hellshare.cz account plugin""" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] CREDIT_LEFT_PATTERN = r'<div class="credit-link">\s*<table>\s*<tr>\s*<th>(\d+|\d\d\.\d\d\.)</th>' @@ -43,19 +44,20 @@ class HellshareCz(Account): trafficleft = int(credit) * 1024 validuntil = -1 except Exception, e: - self.logError("Unable to parse credit info", e) + self.logError(_("Unable to parse credit info"), e) validuntil = -1 trafficleft = -1 return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + def login(self, user, data, req): html = req.load('http://www.hellshare.com/') if req.lastEffectiveURL != 'http://www.hellshare.com/': #Switch to English self.logDebug("Switch lang - URL: %s" % req.lastEffectiveURL) json = req.load("%s?do=locRouter-show" % req.lastEffectiveURL) - hash = re.search(r"(--[0-9a-f]+-)", json).group(1) + hash = re.search(r"(\-\-[0-9a-f]+\-)", json).group(1) self.logDebug("Switch lang - HASH: %s" % hash) html = req.load('http://www.hellshare.com/%s/' % hash) |