summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/HellshareCz.py
diff options
context:
space:
mode:
authorGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-11 14:54:48 +0100
committerGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-11 14:54:48 +0100
commitd2b60b5ceb369814a0de41c8b8744b5c4ed81523 (patch)
tree6619e01fc0e5f281e4d28678ec565860a86784ec /module/plugins/accounts/HellshareCz.py
parentupdated nitroflare.com's plugin (diff)
parentCode improvements (diff)
downloadpyload-d2b60b5ceb369814a0de41c8b8744b5c4ed81523.tar.xz
Merged with the updated nitroflare
Diffstat (limited to 'module/plugins/accounts/HellshareCz.py')
-rw-r--r--module/plugins/accounts/HellshareCz.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py
index dff2fe394..e559b28e1 100644
--- a/module/plugins/accounts/HellshareCz.py
+++ b/module/plugins/accounts/HellshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class HellshareCz(Account):
__name__ = "HellshareCz"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.16"
__description__ = """Hellshare.cz account plugin"""
__license__ = "GPLv3"
@@ -52,25 +52,28 @@ class HellshareCz(Account):
def login(self, user, data, req):
- html = req.load('http://www.hellshare.com/')
+ html = req.load('http://www.hellshare.com/', decode=True)
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)
+
self.logDebug("Switch lang - HASH: %s" % hash)
- html = req.load('http://www.hellshare.com/%s/' % hash)
+
+ html = req.load('http://www.hellshare.com/%s/' % hash, decode=True)
if re.search(self.CREDIT_LEFT_PATTERN, html):
self.logDebug("Already logged in")
return
- html = req.load('http://www.hellshare.com/login?do=loginForm-submit', post={
- "login": "Log in",
- "password": data['password'],
- "username": user,
- "perm_login": "on"
- })
+ html = req.load('http://www.hellshare.com/login?do=loginForm-submit',
+ post={"login": "Log in",
+ "password": data['password'],
+ "username": user,
+ "perm_login": "on"},
+ decode=True)
if "<p>You input a wrong user name or wrong password</p>" in html:
self.wrongPassword()