diff options
author | 2015-12-20 18:43:15 +0100 | |
---|---|---|
committer | 2015-12-27 22:46:01 +0100 | |
commit | 5deded62d94c04be64d34f6b67d07803eea9b6bf (patch) | |
tree | a33f82a6208b3a922bf5e1883f134a1fb86a9217 /module/plugins/hoster/UploadingCom.py | |
parent | Update addons (diff) | |
download | pyload-5deded62d94c04be64d34f6b67d07803eea9b6bf.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster/UploadingCom.py')
-rw-r--r-- | module/plugins/hoster/UploadingCom.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index f44fc9ea3..d8447e964 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -75,7 +75,10 @@ class UploadingCom(SimpleHoster): self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) self.req.http.lastURL = pyfile.url - res = json.loads(self.load(ajax_url, post={'action': 'second_page', 'code': self.info['pattern']['ID']})) + html = self.load(ajax_url, + post={'action': 'second_page', + 'code' : self.info['pattern']['ID']}) + res = json.loads(html) if 'answer' in res and 'wait_time' in res['answer']: wait_time = int(res['answer']['wait_time']) @@ -84,7 +87,11 @@ class UploadingCom(SimpleHoster): else: self.error(_("No AJAX/WAIT")) - res = json.loads(self.load(ajax_url, post={'action': 'get_link', 'code': self.info['pattern']['ID'], 'pass': 'false'})) + html = self.load(ajax_url, + post={'action': 'get_link', + 'code' : self.info['pattern']['ID'], + 'pass' : 'false'}) + res = json.loads(html) if 'answer' in res and 'link' in res['answer']: url = res['answer']['link'] |