summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/YibaishiwuCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/YibaishiwuCom.py')
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py
index fc30c2f4b..0aca311ce 100644
--- a/module/plugins/hoster/YibaishiwuCom.py
+++ b/module/plugins/hoster/YibaishiwuCom.py
@@ -44,9 +44,16 @@ class YibaishiwuCom(SimpleHoster):
self.logDebug(('FREEUSER' if found.group(2) == 'download' else 'GUEST') + ' URL', url)
response = json_loads(self.load("http://115.com" + url, decode=False))
- for mirror in (response['urls'] if 'urls' in response else response['data'] if 'data' in response else []):
+ if "urls" in response:
+ mirrors = response['urls']
+ elif "data" in response:
+ mirrors = response['data']
+ else:
+ mirrors = None
+
+ for m in mirrors:
try:
- url = mirror['url'].replace('\\', '')
+ url = m['url'].replace('\\', '')
self.logDebug("Trying URL: " + url)
self.download(url)
break