summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/HighWayMe.py
diff options
context:
space:
mode:
authorGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
committerGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
commit3a08656c5665f4b8db98744fb323e64b8630e084 (patch)
tree28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/accounts/HighWayMe.py
parentMerge pull request #1 from pyload/stable (diff)
parent[Account] Improve parse_traffic method + code cosmetics (diff)
downloadpyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/accounts/HighWayMe.py')
-rw-r--r--module/plugins/accounts/HighWayMe.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/module/plugins/accounts/HighWayMe.py b/module/plugins/accounts/HighWayMe.py
index ff90ec2d2..3b39b7da6 100644
--- a/module/plugins/accounts/HighWayMe.py
+++ b/module/plugins/accounts/HighWayMe.py
@@ -7,15 +7,25 @@ from module.plugins.internal.Account import Account
class HighWayMe(Account):
__name__ = "HighWayMe.py"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.06"
__status__ = "testing"
+ __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
+ ("mh_list" , "str" , "Hoster list (comma separated)", "" ),
+ ("mh_interval", "int" , "Reload interval in minutes" , 60 )]
+
__description__ = """High-Way.me account plugin"""
__license__ = "GPLv3"
__authors__ = [("EvolutionClip", "evolutionclip@live.de")]
- def parse_info(self, user, password, data, req):
+ def grab_hosters(self, user, password, data):
+ json_data = json_loads(self.load("https://high-way.me/api.php",
+ get={'hoster': 1}))
+ return [element['name'] for element in json_data['hoster']]
+
+
+ def grab_info(self, user, password, data):
premium = False
validuntil = -1
trafficleft = None
@@ -40,11 +50,11 @@ class HighWayMe(Account):
'trafficleft': trafficleft}
- def login(self, user, password, data, req):
+ def signin(self, user, password, data):
html = self.load("https://high-way.me/api.php?login",
post={'login': '1',
'user': user,
'pass': password})
if 'UserOrPassInvalid' in html:
- self.login_fail()
+ self.fail_login()