From c0668ddd72c078bb36563e11499c8e851b3d8bb7 Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Sun, 6 Dec 2015 16:21:21 +0200 Subject: fix #2183 --- module/plugins/accounts/UploadedTo.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index c689dc122..53fd5309e 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class UploadedTo(Account): __name__ = "UploadedTo" __type__ = "account" - __version__ = "0.39" + __version__ = "0.40" __status__ = "testing" __description__ = """Uploaded.to account plugin""" @@ -59,12 +59,17 @@ class UploadedTo(Account): def signin(self, user, password, data): - self.load("http://uploaded.net/language/en") - - html = self.load("http://uploaded.net/io/login", - post={'id': user, - 'pw': password}) - - m = re.search(r'"err":"(.+?)"', html) - if m is not None: - self.fail_login(m.group(1)) + try: + self.load("http://uploaded.net/me") + + html = self.load("http://uploaded.net/io/login", + post={'id': user, + 'pw': password}) + + m = re.search(r'"err":"(.+?)"', html) + if m is not None: + self.fail_login(m.group(1)) + + except Exception, e: + self.log_error(e, trace=True) + self.fail_login(e.message) -- cgit v1.2.3