summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/accounts/FourSharedCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/accounts/FourSharedCom.py')
-rw-r--r--pyload/plugins/accounts/FourSharedCom.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/pyload/plugins/accounts/FourSharedCom.py b/pyload/plugins/accounts/FourSharedCom.py
index bd3820277..69a465671 100644
--- a/pyload/plugins/accounts/FourSharedCom.py
+++ b/pyload/plugins/accounts/FourSharedCom.py
@@ -20,6 +20,7 @@
from module.plugins.Account import Account
from module.common.json_layer import json_loads
+
class FourSharedCom(Account):
__name__ = "FourSharedCom"
__version__ = "0.01"
@@ -27,22 +28,22 @@ class FourSharedCom(Account):
__description__ = """FourSharedCom account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
- def loadAccountInfo(self, user, req):
+
+ def loadAccountInfo(self, user, req):
#fixme
- return ({"validuntil": -1, "trafficleft": -1, "premium": False})
-
+ return {"validuntil": -1, "trafficleft": -1, "premium": False}
+
def login(self, user, data, req):
req.cj.setCookie("www.4shared.com", "4langcookie", "en")
response = req.load('http://www.4shared.com/login',
- post = {"login": user,
- "password": data['password'],
- "remember": "false",
- "doNotRedirect": "true"})
- self.logDebug(response)
+ post={"login": user,
+ "password": data['password'],
+ "remember": "false",
+ "doNotRedirect": "true"})
+ self.logDebug(response)
response = json_loads(response)
-
+
if not "ok" in response or response['ok'] != True:
if "rejectReason" in response and response['rejectReason'] != True:
- self.logError(response['rejectReason'])
- self.wrongPassword() \ No newline at end of file
+ self.logError(response['rejectReason'])
+ self.wrongPassword()