summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/RapideoPl.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
commitec6e5dc7fcdcefee10e37d22473c9accae1104cf (patch)
treed19824c0223b083d5b4256530443165cfabb7a04 /module/plugins/accounts/RapideoPl.py
parentMerge pull request #1850 from chaosblog/patch-2 (diff)
downloadpyload-ec6e5dc7fcdcefee10e37d22473c9accae1104cf.tar.xz
Account class completely rewritten + plugins updated
Diffstat (limited to 'module/plugins/accounts/RapideoPl.py')
-rw-r--r--module/plugins/accounts/RapideoPl.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py
index 4585bc718..6d1e124bc 100644
--- a/module/plugins/accounts/RapideoPl.py
+++ b/module/plugins/accounts/RapideoPl.py
@@ -6,12 +6,13 @@ import time
from module.common.json_layer import json_loads
from module.plugins.internal.Account import Account
+# from module.plugins.internal.MultiAccount import MultiAccount
class RapideoPl(Account):
__name__ = "RapideoPl"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__description__ = "Rapideo.pl account plugin"
@@ -27,13 +28,16 @@ class RapideoPl(Account):
'loc' : "1" ,
'info' : "1" }
- _req = None
- _usr = None
- _pwd = None
+ def grab_hosters(self, user, password, data):
+ hostings = json_loads(self.load("https://www.rapideo.pl/clipboard.php?json=3").strip())
+ hostings_domains = [domain for row in hostings for domain in row['domains'] if row['sdownload'] == "0"]
+ self.log_debug(hostings_domains)
- def grab_info(self, user, password, data, req):
- self._req = req
+ return hostings_domains
+
+
+ def grab_info(self, user, password, data):
try:
result = json_loads(self.run_auth_query())
@@ -55,10 +59,9 @@ class RapideoPl(Account):
'premium' : premium }
- def login(self, user, password, data, req):
- self._usr = user
- self._pwd = hashlib.md5(password).hexdigest()
- self._req = req
+ def signin(self, user, password, data):
+ data['usr'] = user
+ data['pwd'] = hashlib.md5(password).hexdigest()
try:
response = json_loads(self.run_auth_query())
@@ -69,14 +72,11 @@ class RapideoPl(Account):
if "errno" in response.keys():
self.fail_login()
- data['usr'] = self._usr
- data['pwd'] = self._pwd
-
def create_auth_query(self):
query = self.API_QUERY
- query['username'] = self._usr
- query['password'] = self._pwd
+ query['username'] = self.info['data']['usr']
+ query['password'] = self.info['data']['pwd']
return query