summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-20 20:35:18 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-20 20:35:18 +0200
commit3964f4231fa5ff68b07a50d23d3b233a0735612d (patch)
tree38ca7d44679fbc7e720c2191e53c688246c71c6b /module/plugins/accounts
parentCode optimized (diff)
downloadpyload-3964f4231fa5ff68b07a50d23d3b233a0735612d.tar.xz
Simplydebrid: fixed syntax error
+ code reformatted + removed unused imports
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/SimplydebridCOM.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/module/plugins/accounts/SimplydebridCOM.py b/module/plugins/accounts/SimplydebridCOM.py
index faa6091c5..2b14a37c2 100644
--- a/module/plugins/accounts/SimplydebridCOM.py
+++ b/module/plugins/accounts/SimplydebridCOM.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
+from time import mktime, strptime
+
from module.plugins.Account import Account
-import re
-from time import mktime, strptime
class SimplydebridCOM(Account):
__name__ = "SimplydebridCOM"
@@ -14,20 +14,17 @@ class SimplydebridCOM(Account):
def loadAccountInfo(self, user, req):
get_data = {'login': 2, 'u': self.loginname, 'p': self.password}
- response = req.load("http://simply-debrid.com/api.php, get=get_data, decode=True)
+ response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True)
data = [x.strip() for x in response.split(";")]
if str(data[0]) != "1":
return {"premium": False}
else:
- return {
- "trafficleft": -1,
- "validuntil": mktime(strptime(str(data[2]),"%d/%m/%Y"))
- }
+ return {"trafficleft": -1, "validuntil": mktime(strptime(str(data[2]), "%d/%m/%Y"))}
def login(self, user, data, req):
self.loginname = user
self.password = data["password"]
get_data = {'login': 1, 'u': self.loginname, 'p': self.password}
- response = req.load("http://simply-debrid.com/api.php, get=get_data, decode=True)
+ response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True)
if response != "02: loggin success":
self.wrongPassword()