diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-05 16:55:21 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-01-05 16:55:21 +0100 |
commit | 24c8e48093a2cb62ef1044761bf7bf68098ef151 (patch) | |
tree | 359d236308f2eff9713bcc6cc0018d59c61fb4a6 | |
parent | little fixes (diff) | |
download | pyload-24c8e48093a2cb62ef1044761bf7bf68098ef151.tar.xz |
fixed #207
-rw-r--r-- | module/network/Browser.py | 1 | ||||
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 4 | ||||
-rw-r--r-- | module/web/templates/500.html | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/module/network/Browser.py b/module/network/Browser.py index 6d8488b6a..054e099b3 100644 --- a/module/network/Browser.py +++ b/module/network/Browser.py @@ -29,6 +29,7 @@ class Browser(object): lastEffectiveURL = property(lambda self: self.http.lastEffectiveURL) lastURL = property(lambda self: self.http.lastURL, setLastURL) code = property(lambda self: self.http.code) + cookieJar = property(lambda self: self.cj) def setCookieJar(self, cj): self.cj = cj diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index b432bf98a..94d78d63c 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -20,7 +20,6 @@ from module.plugins.Account import Account import re from time import strptime, mktime -from cookielib import Cookie class UploadedTo(Account): __name__ = "UploadedTo" @@ -31,7 +30,7 @@ class UploadedTo(Account): __author_mail__ = ("mkaay@mkaay.de") def loadAccountInfo(self, user, req): - html = req.load("http://uploaded.to/", cookies=True) + 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) traffic = int(self.parseTraffic(raw_traffic)) @@ -41,7 +40,6 @@ class UploadedTo(Account): return tmp def login(self, user, data, req): - req.cookieJar.set_cookie(Cookie(version=0, name='lang', value='en', port=None, port_specified=False, domain='.uploaded.to', domain_specified=True, domain_initial_dot=True, path='/', path_specified=True, secure=False, expires=None, discard=False, comment=None, comment_url=None, rest={}, rfc2109=False)) page = req.load("http://uploaded.to/login", post={ "email" : user, "password" : data["password"]}) if "Login failed!" in page: self.wrongPassword() diff --git a/module/web/templates/500.html b/module/web/templates/500.html index a751c4893..e15090b66 100644 --- a/module/web/templates/500.html +++ b/module/web/templates/500.html @@ -2,9 +2,9 @@ "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> - <title></title> + <title>Server Error</title> </head> <body> -<h1>Server Error occured.</h1> +<h1>Server Error occured. Please enable debug mode to get a more detailed report.</h1> </body> -</html>
\ No newline at end of file +</html> |