From f23019b934446275b97f0c5fecf7709c19e557f9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 29 Jan 2015 02:19:37 +0100 Subject: [JustPremium] Cleanup --- module/plugins/hoster/FreeWayMe.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'module/plugins/hoster/FreeWayMe.py') diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py index 6d08e1f8d..76ffca505 100644 --- a/module/plugins/hoster/FreeWayMe.py +++ b/module/plugins/hoster/FreeWayMe.py @@ -27,27 +27,27 @@ class FreeWayMe(MultiHoster): for _i in xrange(5): # try it five times header = self.load("https://www.free-way.me/load.php", - get={'multiget': 7, - 'url' : pyfile.url, - 'user' : user, - 'pw' : self.account.getAccountData(user)['password'], - 'json' : ""}, just_header=True) - if "location" in header: - #download - self.logInfo("Download: " + header['location']) - headers = self.load(header['location'],just_header=True) + get={'multiget': 7, + 'url' : pyfile.url, + 'user' : user, + 'pw' : self.account.getAccountData(user)['password'], + 'json' : ""}, + just_header=True) + + if 'location' in header: + headers = self.load(header['location'], just_header=True) if headers['code'] == 500: - #error on 2nd stage - self.logInfo("Free-Way Error [stage2]") - # todo: handle errors + # error on 2nd stage + self.logError(_("Error [stage2]")) else: # seems to work.. self.download(header['location']) break else: - #error page first stage - self.logInfo("Free-Way Error [stage1]") - # todo: handle errors + # error page first stage + self.logError(_("Error [stage1]")) + + #@TODO: handle errors getInfo = create_getInfo(FreeWayMe) -- cgit v1.2.3