summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/NetloadIn.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-18 10:52:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-18 10:52:11 +0200
commit01da7eb561776ee706c1fd74e49a1b1664951d76 (patch)
treeaa413795fe1e518657d4d234066a82400f56c2ed /module/plugins/accounts/NetloadIn.py
parentrs fix, more cleanup stuff (diff)
downloadpyload-01da7eb561776ee706c1fd74e49a1b1664951d76.tar.xz
closed #157, account request cleanup
Diffstat (limited to 'module/plugins/accounts/NetloadIn.py')
-rw-r--r--module/plugins/accounts/NetloadIn.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py
index 16e06b688..957435b46 100644
--- a/module/plugins/accounts/NetloadIn.py
+++ b/module/plugins/accounts/NetloadIn.py
@@ -29,16 +29,14 @@ class NetloadIn(Account):
__author_name__ = ("RaNaN")
__author_mail__ = ("RaNaN@pyload.org")
- def loadAccountInfo(self, user):
- req = self.getAccountRequest(user)
+ def loadAccountInfo(self, user, req):
page = req.load("http://netload.in/index.php?id=2")
left = r">(\d+) Tage, (\d+) Stunden<"
left = re.search(left, page)
validuntil = time() + int(left.group(1)) * 24 * 60 * 60 + int(left.group(2)) * 60 * 60
return {"validuntil": validuntil, "trafficleft": -1}
- def login(self, user, data):
- req = self.getAccountRequest(user)
+ def login(self, user, req):
page = req.load("http://netload.in/index.php", None, { "txtuser" : user, "txtpass" : data['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True)
if "password or it might be invalid!" in page:
self.wrongPassword()