summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/DebridItaliaCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-11 15:42:39 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-11 15:42:39 +0200
commit6a0fb7fdd4ea2749be44625225d8a235a78f032f (patch)
tree571261d5c54913459a9016e689d07303c4376d07 /module/plugins/accounts/DebridItaliaCom.py
parentPattern update 3 (diff)
downloadpyload-6a0fb7fdd4ea2749be44625225d8a235a78f032f.tar.xz
[accounts] Code cosmetics
Diffstat (limited to 'module/plugins/accounts/DebridItaliaCom.py')
-rw-r--r--module/plugins/accounts/DebridItaliaCom.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py
index 754d3467d..48b46cc0b 100644
--- a/module/plugins/accounts/DebridItaliaCom.py
+++ b/module/plugins/accounts/DebridItaliaCom.py
@@ -20,18 +20,21 @@ class DebridItaliaCom(Account):
def loadAccountInfo(self, user, req):
- if 'Account premium not activated' in self.html:
+ html = req.load("http://debriditalia.com/")
+
+ if 'Account premium not activated' in html:
return {"premium": False, "validuntil": None, "trafficleft": None}
- m = re.search(self.WALID_UNTIL_PATTERN, self.html)
+ m = re.search(self.WALID_UNTIL_PATTERN, html)
if m:
validuntil = int(time.mktime(time.strptime(m.group('D'), "%d/%m/%Y %H:%M")))
return {"premium": True, "validuntil": validuntil, "trafficleft": -1}
else:
self.logError("Unable to retrieve account information - Plugin may be out of date")
+
def login(self, user, data, req):
- self.html = req.load("http://debriditalia.com/login.php",
- get={"u": user, "p": data['password']})
- if 'NO' in self.html:
+ html = req.load("http://debriditalia.com/login.php",
+ get={"u": user, "p": data['password']})
+ if 'NO' in html:
self.wrongPassword()