diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-18 10:52:11 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-18 10:52:11 +0200 |
commit | 01da7eb561776ee706c1fd74e49a1b1664951d76 (patch) | |
tree | aa413795fe1e518657d4d234066a82400f56c2ed /module/plugins/accounts/UploadedTo.py | |
parent | rs fix, more cleanup stuff (diff) | |
download | pyload-01da7eb561776ee706c1fd74e49a1b1664951d76.tar.xz |
closed #157, account request cleanup
Diffstat (limited to 'module/plugins/accounts/UploadedTo.py')
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 4c45fb6fc..2cb447877 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -29,8 +29,7 @@ class UploadedTo(Account): __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - def loadAccountInfo(self, user): - req = self.getAccountRequest(user) + def loadAccountInfo(self, user, req): html = req.load("http://uploaded.to/?setlang=en", cookies=True) raw_traffic = re.search(r"Traffic left: </span><span class=.*?>(.*?)</span>", html).group(1) raw_valid = re.search(r"Valid until: </span> <span class=.*?>(.*?)</span>", html).group(1) @@ -40,8 +39,7 @@ class UploadedTo(Account): tmp = {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":100*1024*1024} return tmp - def login(self, user, data): - req = self.getAccountRequest(user) + def login(self, user, data, req): page = req.load("http://uploaded.to/login", post={ "email" : user, "password" : data["password"]}, cookies=True) if "Login failed!" in page: self.wrongPassword() |