summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/YibaishiwuCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-09 00:35:51 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-09 00:35:51 +0100
commitfd105f8e51768ec1943cda2375bdfdbe5b0a3951 (patch)
treeccbdbe3cd23c606e8102f11ae4e0722f7e7a3227 /module/plugins/hoster/YibaishiwuCom.py
parent"New Year" Update: hook plugins (diff)
downloadpyload-fd105f8e51768ec1943cda2375bdfdbe5b0a3951.tar.xz
"New Year" Update: hoster plugins
Diffstat (limited to 'module/plugins/hoster/YibaishiwuCom.py')
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py
index 3b4692933..adc403de4 100644
--- a/module/plugins/hoster/YibaishiwuCom.py
+++ b/module/plugins/hoster/YibaishiwuCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class YibaishiwuCom(SimpleHoster):
__name__ = "YibaishiwuCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__pattern__ = r'http://(?:www\.)?(?:u\.)?115\.com/file/(?P<ID>\w+)'
@@ -22,21 +22,25 @@ class YibaishiwuCom(SimpleHoster):
SIZE_PATTERN = r'file_size: \'(?P<S>.+?)\''
OFFLINE_PATTERN = ur'<h3><i style="color:red;">哎呀!提取码不存在!不妨搜搜看吧!</i></h3>'
- LINK_PATTERN = r'(/\?ct=(pickcode|download)[^"\']+)'
+ LINK_FREE_PATTERN = r'(/\?ct=(pickcode|download)[^"\']+)'
- def handleFree(self):
- m = re.search(self.LINK_PATTERN, self.html)
+ def handleFree(self, pyfile):
+ m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
- self.error(_("LINK_PATTERN not found"))
+ self.error(_("LINK_FREE_PATTERN not found"))
+
url = m.group(1)
+
self.logDebug(('FREEUSER' if m.group(2) == 'download' else 'GUEST') + ' URL', url)
res = json_loads(self.load("http://115.com" + url, decode=False))
if "urls" in res:
mirrors = res['urls']
+
elif "data" in res:
mirrors = res['data']
+
else:
mirrors = None