diff --git a/addons.xml b/addons.xml index e2a7bfb..dd92564 100644 --- a/addons.xml +++ b/addons.xml @@ -6,7 +6,7 @@ provider-name="yfang1644"> - + - + video @@ -74,7 +74,7 @@ version="1.2.13" provider-name="Uranus Zhou,yfang1644"> - + video @@ -145,7 +145,7 @@ provider-name="Taxigps,yfang1644"> - + - + video @@ -380,7 +380,7 @@ provider-name="catro, yfang1644"> - + video @@ -395,23 +395,23 @@ - - + video - QIYI Video plugin - 奇艺视频插件 - QIYI (QIYI.COM) was founded by Baidu- world's the largest Chinese search engine, invested by Providence Equity Partners-U.S. private equity, QIYI is the first professional website dedicated to providing free, high-definition network video services. - 奇艺(QIYI.COM)是由百度创立的大型专业网站,专注于提供免费、高清网络视频服务。奇艺的优质版权视频丰富多元,涵盖了电影、电视剧、综艺、纪录片、动漫、旅游等众多内容形态。 - https://github.com/yfang1644/kodi_plugins/plugin.video.qiyi + IQIYI Video plugin + 爱奇艺视频插件 + IQIYI (iqiyi.com) was founded by Baidu- world's the largest Chinese search engine, invested by Providence Equity Partners-U.S. private equity, QIYI is the first professional website dedicated to providing free, high-definition network video services. + 爱奇艺(iqiyi.com)是由百度创立的大型专业网站,专注于提供免费、高清网络视频服务。奇艺的优质版权视频丰富多元,涵盖了电影、电视剧、综艺、纪录片、动漫、旅游等众多内容形态。 + https://github.com/yfang1644/kodi_plugins/plugin.video.iqiyi yfang1644@gmail.com all @@ -481,7 +481,7 @@ provider-name="taxigps,yfang1644"> - + video @@ -503,7 +503,7 @@ provider-name="yfang1644"> - + video @@ -585,7 +585,7 @@ provider-name="yfang1644"> - + @@ -730,7 +730,7 @@ - + video diff --git a/addons.xml.md5 b/addons.xml.md5 index e3a6a62..bb83fec 100644 --- a/addons.xml.md5 +++ b/addons.xml.md5 @@ -1 +1 @@ -3c7c55f8bab8f94cf9500d8f6ef7ad61 addons.xml +cba5969bbfcf17099b91ae11ad7e2683 addons.xml diff --git a/plugin.audio.1ting/plugin.audio.1ting-2.2.0.zip b/plugin.audio.1ting/plugin.audio.1ting-2.2.0.zip index 53ccc62..23043a4 100644 Binary files a/plugin.audio.1ting/plugin.audio.1ting-2.2.0.zip and b/plugin.audio.1ting/plugin.audio.1ting-2.2.0.zip differ diff --git a/plugin.audio.baidufm/plugin.audio.baidufm-0.0.5.zip b/plugin.audio.baidufm/plugin.audio.baidufm-0.0.5.zip index be88c3e..08d77da 100644 Binary files a/plugin.audio.baidufm/plugin.audio.baidufm-0.0.5.zip and b/plugin.audio.baidufm/plugin.audio.baidufm-0.0.5.zip differ diff --git a/plugin.audio.baiduradio/plugin.audio.baiduradio-1.0.1.zip b/plugin.audio.baiduradio/plugin.audio.baiduradio-1.0.1.zip index 66a5e5d..fd7e18f 100644 Binary files a/plugin.audio.baiduradio/plugin.audio.baiduradio-1.0.1.zip and b/plugin.audio.baiduradio/plugin.audio.baiduradio-1.0.1.zip differ diff --git a/plugin.audio.doubanfm/plugin.audio.doubanfm-1.0.1.zip b/plugin.audio.doubanfm/plugin.audio.doubanfm-1.0.1.zip index a94f972..056ec11 100644 Binary files a/plugin.audio.doubanfm/plugin.audio.doubanfm-1.0.1.zip and b/plugin.audio.doubanfm/plugin.audio.doubanfm-1.0.1.zip differ diff --git a/plugin.audio.kugoufm/plugin.audio.kugoufm-1.0.1.zip b/plugin.audio.kugoufm/plugin.audio.kugoufm-1.0.1.zip index 74fd785..f5712cd 100644 Binary files a/plugin.audio.kugoufm/plugin.audio.kugoufm-1.0.1.zip and b/plugin.audio.kugoufm/plugin.audio.kugoufm-1.0.1.zip differ diff --git a/plugin.audio.kuwo/addon.xml b/plugin.audio.kuwo/addon.xml index dd83d0d..874905f 100644 --- a/plugin.audio.kuwo/addon.xml +++ b/plugin.audio.kuwo/addon.xml @@ -5,7 +5,7 @@ provider-name="yfang1644"> - + diff --git a/plugin.audio.kuwo/plugin.audio.kuwo-2.2.4.zip b/plugin.audio.kuwo/plugin.audio.kuwo-2.2.4.zip index 57187d7..abb090f 100644 Binary files a/plugin.audio.kuwo/plugin.audio.kuwo-2.2.4.zip and b/plugin.audio.kuwo/plugin.audio.kuwo-2.2.4.zip differ diff --git a/plugin.audio.kuwobox/plugin.audio.kuwobox-1.1.5.zip b/plugin.audio.kuwobox/plugin.audio.kuwobox-1.1.5.zip new file mode 100644 index 0000000..164585e Binary files /dev/null and b/plugin.audio.kuwobox/plugin.audio.kuwobox-1.1.5.zip differ diff --git a/plugin.audio.radiocn/plugin.audio.radiocn-1.0.zip b/plugin.audio.radiocn/plugin.audio.radiocn-1.0.zip index 8967b8d..5f3a715 100644 Binary files a/plugin.audio.radiocn/plugin.audio.radiocn-1.0.zip and b/plugin.audio.radiocn/plugin.audio.radiocn-1.0.zip differ diff --git a/plugin.audio.ximalaya/addon.xml b/plugin.audio.ximalaya/addon.xml index e7a4489..3503d9e 100644 --- a/plugin.audio.ximalaya/addon.xml +++ b/plugin.audio.ximalaya/addon.xml @@ -4,7 +4,7 @@ provider-name="yfang1644"> - + audio diff --git a/plugin.audio.ximalaya/plugin.audio.ximalaya-1.0.3.zip b/plugin.audio.ximalaya/plugin.audio.ximalaya-1.0.3.zip index 557ccb3..aeaa481 100644 Binary files a/plugin.audio.ximalaya/plugin.audio.ximalaya-1.0.3.zip and b/plugin.audio.ximalaya/plugin.audio.ximalaya-1.0.3.zip differ diff --git a/plugin.video.5ivdo/plugin.video.5ivdo-1.2.0.zip b/plugin.video.5ivdo/plugin.video.5ivdo-1.2.0.zip index 9c0b2e0..c8222fb 100644 Binary files a/plugin.video.5ivdo/plugin.video.5ivdo-1.2.0.zip and b/plugin.video.5ivdo/plugin.video.5ivdo-1.2.0.zip differ diff --git a/plugin.video.asia-tv/plugin.video.asia-tv-2.0.5.zip b/plugin.video.asia-tv/plugin.video.asia-tv-2.0.5.zip index ce47f82..f01430f 100644 Binary files a/plugin.video.asia-tv/plugin.video.asia-tv-2.0.5.zip and b/plugin.video.asia-tv/plugin.video.asia-tv-2.0.5.zip differ diff --git a/plugin.video.baiduyun/plugin.video.baiduyun-0.2.9.zip b/plugin.video.baiduyun/plugin.video.baiduyun-0.2.9.zip new file mode 100644 index 0000000..6afda2e Binary files /dev/null and b/plugin.video.baiduyun/plugin.video.baiduyun-0.2.9.zip differ diff --git a/plugin.video.bdyun/plugin.video.bdyun-0.1.9.zip b/plugin.video.bdyun/plugin.video.bdyun-0.1.9.zip new file mode 100644 index 0000000..53a2bfc Binary files /dev/null and b/plugin.video.bdyun/plugin.video.bdyun-0.1.9.zip differ diff --git a/plugin.video.bilibili/addon.xml b/plugin.video.bilibili/addon.xml index cdef6ce..d2d9c9f 100644 --- a/plugin.video.bilibili/addon.xml +++ b/plugin.video.bilibili/addon.xml @@ -6,7 +6,7 @@ - + video diff --git a/plugin.video.bilibili/plugin.video.bilibili-1.0.4.zip b/plugin.video.bilibili/plugin.video.bilibili-1.0.4.zip index 4d02a1b..2ede468 100644 Binary files a/plugin.video.bilibili/plugin.video.bilibili-1.0.4.zip and b/plugin.video.bilibili/plugin.video.bilibili-1.0.4.zip differ diff --git a/plugin.video.bilibili2/addon.xml b/plugin.video.bilibili2/addon.xml index 3646936..086c62e 100644 --- a/plugin.video.bilibili2/addon.xml +++ b/plugin.video.bilibili2/addon.xml @@ -5,7 +5,7 @@ provider-name="Syndim,yfang1644"> - + video diff --git a/plugin.video.bilibili2/plugin.video.bilibili2-0.2.9.zip b/plugin.video.bilibili2/plugin.video.bilibili2-0.2.9.zip new file mode 100644 index 0000000..2138a42 Binary files /dev/null and b/plugin.video.bilibili2/plugin.video.bilibili2-0.2.9.zip differ diff --git a/plugin.video.cntv-live/plugin.video.cntv-live-2.0.10.zip b/plugin.video.cntv-live/plugin.video.cntv-live-2.0.10.zip index bd2a346..8272117 100644 Binary files a/plugin.video.cntv-live/plugin.video.cntv-live-2.0.10.zip and b/plugin.video.cntv-live/plugin.video.cntv-live-2.0.10.zip differ diff --git a/plugin.video.cntv-video/addon.xml b/plugin.video.cntv-video/addon.xml index c867743..edb8941 100644 --- a/plugin.video.cntv-video/addon.xml +++ b/plugin.video.cntv-video/addon.xml @@ -1,7 +1,7 @@ diff --git a/plugin.video.cntv-video/default.py b/plugin.video.cntv-video/default.py index c5ad032..e52b97f 100644 --- a/plugin.video.cntv-video/default.py +++ b/plugin.video.cntv-video/default.py @@ -267,7 +267,7 @@ def list_by_jsondata(data): desc = jsdata[i].get('brief', '') li = ListItem(title, - iconImage=p_thumb, thumbnailImage=p_thumb) + iconImage=p_thumb, thumbnailImage=p_thumb) li.setInfo(type='Video', infoLabels={'Title': title, 'Plot': desc}) u = sys.argv[0] + '?mode=playvideo&url=' + p_url diff --git a/plugin.video.cntv-video/lib/common.py b/plugin.video.cntv-video/lib/common.py index 3c859b2..428199e 100644 --- a/plugin.video.cntv-video/lib/common.py +++ b/plugin.video.cntv-video/lib/common.py @@ -4,6 +4,7 @@ import urllib2 import re import gzip +import zlib import StringIO import socket cookies = None @@ -79,6 +80,8 @@ def get_html(url, if data[-1] == '\n': data = data[:-1] data = gzip.GzipFile(fileobj=StringIO.StringIO(data)).read() + elif content_encoding == 'deflate': + data = zlib.decompressobj(-zlib.MAX_WBITS).decompress(data) # Decode the response body if decoded: diff --git a/plugin.video.cntv-video/lib/sohu.py b/plugin.video.cntv-video/lib/sohu.py index 619f5b5..c85f844 100644 --- a/plugin.video.cntv-video/lib/sohu.py +++ b/plugin.video.cntv-video/lib/sohu.py @@ -47,9 +47,12 @@ class Sohu(): v_api1 = 'http://hot.vrs.sohu.com/vrs_flash.action?vid=%s' v_api2 = 'http://my.tv.sohu.com/play/videonew.do?vid=%s&referer=http://my.tv.sohu.com' - def real_url(self, host, vid, tvid, new, clipURL, ck): - url = 'http://'+host+'/?prot=9&prod=flash&pt=1&file='+clipURL+'&new='+new +'&key='+ ck+'&vid='+str(vid)+'&uid='+str(int(time.time()*1000))+'&t='+str(random())+'&rb=1' - return loads(get_html(url))['url'] + def real_url(self, host, vid, new, clipURL, ck): + url = 'http://'+host+'/?prot=9&prod=flash&pt=1&file='+clipURL+'&new='+new +'&key='+ck+'&vid='+str(vid)+'&uid='+str(int(time.time()*1000))+'&t='+str(random())+'&rb=1' + try: + return loads(get_html(url))['url'] + except: + return '' def video_from_url(self, url, **kwargs): if re.match(r'http://share.vrs.sohu.com', url): @@ -59,18 +62,19 @@ def video_from_url(self, url, **kwargs): vid = r1(r'\Wvid\s*[\:=]\s*[\'"]?(\d+)[\'"]?', html) assert vid - if re.match(r'http://tv.sohu.com/', url): + return video_from_vid(self, vid, **kwargs) + + def video_from_vid(self, vid, **kwargs): + vidlist = ['oriVid', 'superVid', 'highVid', 'norVid', 'relativeId'] + level = kwargs.get('level', 0) + qtyp = vidlist[level] + + #if re.match(r'http://tv.sohu.com/', url): # if extractor_proxy: # set_proxy(tuple(extractor_proxy.split(":"))) + try: info = loads(get_html(self.v_api1 % vid)) - vidlist = ['oriVid', - 'superVid', - 'highVid', - 'norVid', - 'relativeId'] - level = kwargs.get('level', 0) - qtyp = vidlist[level] if 'data' in info: hqvid = info['data'][qtyp] else: @@ -79,26 +83,26 @@ def video_from_url(self, url, **kwargs): info = loads(get_html(self.v_api1 % hqvid)) # if extractor_proxy: # unset_proxy() - - else: + except: info = loads(get_html(self.v_api2 % vid)) host = info['allot'] prot = info['prot'] - tvid = info['tvid'] - urls = [] + tvId = info['tvid'] data = info['data'] title = data['tvName'] size = sum(map(int, data['clipsBytes'])) + urls = [] assert len(data['clipsURL']) == len(data['clipsBytes']) == len(data['su']) for new, clip, ck, in zip(data['su'], data['clipsURL'], data['ck']): clipURL = urlparse.urlparse(clip).path - url = self.real_url(host, vid, tvid, new, clipURL, ck) - url += '|RANGE=' - urls.append(url) + url = self.real_url(host, vid, new, clipURL, ck) + if url: + urls.append(url + '|RANGE=') # assert data['clipsURL'][0].endswith('.mp4') return urls site = Sohu() video_from_url = site.video_from_url +video_from_vid = site.video_from_vid diff --git a/plugin.video.cntv-video/plugin.video.cntv-video-1.0.5.zip b/plugin.video.cntv-video/plugin.video.cntv-video-1.0.6.zip similarity index 66% rename from plugin.video.cntv-video/plugin.video.cntv-video-1.0.5.zip rename to plugin.video.cntv-video/plugin.video.cntv-video-1.0.6.zip index d495383..0d5ae64 100644 Binary files a/plugin.video.cntv-video/plugin.video.cntv-video-1.0.5.zip and b/plugin.video.cntv-video/plugin.video.cntv-video-1.0.6.zip differ diff --git a/plugin.video.funshion/addon.xml b/plugin.video.funshion/addon.xml index 8e7801a..7e67645 100644 --- a/plugin.video.funshion/addon.xml +++ b/plugin.video.funshion/addon.xml @@ -5,7 +5,7 @@ provider-name="taxigps,yfang1644"> - + video diff --git a/plugin.video.funshion/default.py b/plugin.video.funshion/default.py index deea4c0..20dbfba 100644 --- a/plugin.video.funshion/default.py +++ b/plugin.video.funshion/default.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- import xbmc -import xbmcgui +from xbmcgui import Dialog, ListItem import xbmcplugin import xbmcaddon -from urlparse import parse_qsl +from urlparse import import parse_qsl from urllib import quote_plus import re import sys @@ -16,6 +16,7 @@ from funshion import videos_from_url BANNER_FMT = '[COLOR FFDEB887]【%s】[/COLOR]' +EXTRA = '[COLOR FF8080FF] %s[/COLOR]' HOST_URL = 'http://www.fun.tv' @@ -108,7 +109,7 @@ def updateListSEL(params): tree = BeautifulSoup(html, 'html.parser') soup = tree.find_all('div', {'class': 'ls-nav-bar'}) - dialog = xbmcgui.Dialog() + dialog = Dialog() filter = '' for iclass in soup[1:]: @@ -151,7 +152,7 @@ def playList(params, playlist, j): return u = sys.argv[0] - li = xbmcgui.ListItem(BANNER_FMT % '播放列表') + li = ListItem(BANNER_FMT % '播放列表') xbmcplugin.addDirectoryItem(pluginhandle, u, li, False) for item in lists: @@ -189,7 +190,7 @@ def relatedList(params, playlist, j): return u = sys.argv[0] - li = xbmcgui.ListItem(BANNER_FMT % '相关推荐') + li = ListItem(BANNER_FMT % '相关推荐') xbmcplugin.addDirectoryItem(pluginhandle, u, li, False) for item in items: @@ -226,7 +227,7 @@ def relatedList(params, playlist, j): if desc: p_name1 += ' (' + desc.text + ')' - li = xbmcgui.ListItem(p_name1, iconImage='', thumbnailImage=p_thumb) + li = ListItem(p_name1, iconImage='', thumbnailImage=p_thumb) li.setInfo(type="Video", infoLabels={"Title": p_name}) u = sys.argv[0] + '?mode=albumlist&url=' + href u += '&name=' + quote_plus(name) @@ -246,7 +247,7 @@ def singleVideo(params): playlist = xbmc.PlayList(1) playlist.clear() - j = 0 + u = sys.argv[0] + '?mode=movielist&url=' + url u += '&title=%d.%s' % (j, title) u += '&name=' + quote_plus(name) @@ -254,9 +255,9 @@ def singleVideo(params): li = xbmcgui.ListItem(BANNER_FMT % title, thumbnailImage=thumb) xbmcplugin.addDirectoryItem(pluginhandle, u, li, False) playlist.add(url, li) - j += 1 # playlist + j = 1 playList(params, playlist, j) # related @@ -277,15 +278,15 @@ def seriesList(params): link = get_html(url % id) json_response = loads(link) if json_response['status'] == 404: - ok = xbmcgui.Dialog().ok(__addonname__, '本片暂不支持网页播放') + Dialog().ok(__addonname__, '本片暂不支持网页播放') return items = json_response['data']['videos'] # name = json_response['data']['name'].encode('utf-8') playlist = xbmc.PlayList(1) playlist.clear() - j = 0 - for item in items: + + for (j, item) in enumerate(items): p_name = item['name'].encode('utf-8') p_url = httphead(item['url'].encode('utf-8')) # p_number = str(item['number']) @@ -295,25 +296,22 @@ def seriesList(params): p_thumb = thumb seconds = item['duration'] - m, s = divmod(seconds, 60) - h, m = divmod(m, 60) - time = '%02d:%02d' % (m, s) - if h != 0: - time = '%d:%s' % (h, time) u = sys.argv[0] + '?mode=movielist&title=%d.%s' % (j, p_name) u += '&name=' + quote_plus(name) u += '&thumb=' + p_thumb + '&url=' + p_url if item['dtype'] == 'prevue': - extra = '|预' + extra = EXTRA % '|预' else: extra = '' - - li = xbmcgui.ListItem(p_name + '(' + time + extra + ')', + info = { + 'label': p_name, + 'duration': seconds + } + li = ListItem(p_name + extra, iconImage='', thumbnailImage=p_thumb) xbmcplugin.addDirectoryItem(pluginhandle, u, li, False) playlist.add(p_url, li) - j += 1 # playlist playList(params, playlist, j) @@ -330,7 +328,7 @@ def selResolution(): resolution = int(__addon__.getSetting('resolution')) if resolution == 4: list = [x[1] for x in RES_LIST] - sel = xbmcgui.Dialog().select('清晰度', list) + sel = Dialog().select('清晰度', list) return sel else: return resolution @@ -348,10 +346,10 @@ def PlayVideo_test(params): v_urls = videos_from_url(url, level=resolution) if len(v_urls) > 0: v_url = replaceServer(v_urls[0]) - listitem = xbmcgui.ListItem(title, thumbnailImage=thumb) + listitem = ListItem(title, thumbnailImage=thumb) xbmc.Player().play(v_url, listitem) else: - ok = xbmcgui.Dialog().ok(__addonname__, '没有可播放的视频') + Dialog().ok(__addonname__, '没有可播放的视频') ################################################################################## @@ -451,7 +449,7 @@ def albumList(params): elif vid: seriesList(params) # list series else: - xbmcgui.Dialog().ok(__addonname__, '本片暂不支持网页播放') + Dialog().ok(__addonname__, '本片暂不支持网页播放') return @@ -469,7 +467,7 @@ def mainList(params): items = soup[0].find_all('div', {'class': 'mod-vd-i'}) items = tree.find_all('div', {'class': 'mod-vd-i'}) - li = xbmcgui.ListItem(name + '【选择过滤】' + filtrs) + li = ListItem(name + '【选择过滤】' + filtrs) u = sys.argv[0] + '?mode=filter&name=' + name u += '&url=' + url u += '&filtrs=' + filtrs @@ -498,15 +496,18 @@ def mainList(params): p_name1 += ' [COLOR FF00FFFF][高清][/COLOR]' p_duration = item.find('i', {'class': 'tip'}) + info = { + 'label': p_name, + } if p_duration: - p_name1 += ' [COLOR FF00FF00][' + p_duration.text + '][/COLOR]' + info['duration'] = int(p_duration.text) desc = inf.find('p', {'class', 'desc'}) if desc: p_name1 += ' (' + desc.text + ')' - li = xbmcgui.ListItem(p_name1, iconImage='', thumbnailImage=p_thumb) - li.setInfo(type="Video", infoLabels={"Title": p_name}) + li = ListItem(p_name1, iconImage='', thumbnailImage=p_thumb) + li.setInfo(type="Video", infoLabels=info) u = sys.argv[0] + '?mode=albumlist&url=' + href u += '&name=' + quote_plus(name) u += '&title=' + p_name + '&thumb=' + p_thumb @@ -524,7 +525,7 @@ def mainList(params): else: href = httphead(href) title = page.text - li = xbmcgui.ListItem(title) + li = ListItem(title) u = sys.argv[0] + '?mode=mainlist' u += '&name=' + quote_plus(name) u += '&url=' + href @@ -544,7 +545,7 @@ def rootList(): for item in items: name = item.a.text.encode('utf-8') url = httphead(item.a['href']) - li = xbmcgui.ListItem(name) + li = ListItem(name) u = sys.argv[0] + '?mode=mainlist' u += '&name=' + quote_plus(name) u += '&url=' + quote_plus(url) diff --git a/plugin.video.funshion/plugin.video.funshion-1.1.3.zip b/plugin.video.funshion/plugin.video.funshion-1.1.3.zip index c859caf..ae3849b 100644 Binary files a/plugin.video.funshion/plugin.video.funshion-1.1.3.zip and b/plugin.video.funshion/plugin.video.funshion-1.1.3.zip differ diff --git a/plugin.video.qiyi/addon.xml b/plugin.video.iqiyi/addon.xml similarity index 54% rename from plugin.video.qiyi/addon.xml rename to plugin.video.iqiyi/addon.xml index dc1c6df..f28a160 100644 --- a/plugin.video.qiyi/addon.xml +++ b/plugin.video.iqiyi/addon.xml @@ -1,21 +1,21 @@ - - + video - QIYI Video plugin - 奇艺视频插件 - QIYI (QIYI.COM) was founded by Baidu- world's the largest Chinese search engine, invested by Providence Equity Partners-U.S. private equity, QIYI is the first professional website dedicated to providing free, high-definition network video services. - 奇艺(QIYI.COM)是由百度创立的大型专业网站,专注于提供免费、高清网络视频服务。奇艺的优质版权视频丰富多元,涵盖了电影、电视剧、综艺、纪录片、动漫、旅游等众多内容形态。 - https://github.com/yfang1644/kodi_plugins/plugin.video.qiyi + IQIYI Video plugin + 爱奇艺视频插件 + IQIYI (iqiyi.com) was founded by Baidu- world's the largest Chinese search engine, invested by Providence Equity Partners-U.S. private equity, QIYI is the first professional website dedicated to providing free, high-definition network video services. + 爱奇艺(iqiyi.com)是由百度创立的大型专业网站,专注于提供免费、高清网络视频服务。奇艺的优质版权视频丰富多元,涵盖了电影、电视剧、综艺、纪录片、动漫、旅游等众多内容形态。 + https://github.com/yfang1644/kodi_plugins/plugin.video.iqiyi yfang1644@gmail.com all diff --git a/plugin.video.qiyi/changelog.txt b/plugin.video.iqiyi/changelog.txt similarity index 100% rename from plugin.video.qiyi/changelog.txt rename to plugin.video.iqiyi/changelog.txt diff --git a/plugin.video.qiyi/default.py b/plugin.video.iqiyi/default.py similarity index 97% rename from plugin.video.qiyi/default.py rename to plugin.video.iqiyi/default.py index 8c2283e..ddb0204 100644 --- a/plugin.video.qiyi/default.py +++ b/plugin.video.iqiyi/default.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import xbmc -from xbmcgui import Dialog, DialogProgress, ListItem +from xbmcgui import Dialog, ListItem import xbmcplugin import xbmcaddon from urlparse import parse_qsl @@ -301,17 +301,15 @@ def listType2(albumId, page, thumb, title): p_name = item['vn'] desc = item['desc'] seconds = item['timeLength'] - m, s = divmod(seconds, 60) - h, m = divmod(m, 60) - time = '%02d:%02d' % (m, s) - if h != 0: - time = '%d:%s' % (h, time) + info = { + 'label': p_name, + 'duration': seconds, + 'plot': desc + } if item['vt']: p_name = p_name + ' ' + item['vt'] - li = ListItem(p_name + '(' + time + ')', - iconImage=p_thumb, thumbnailImage=p_thumb) - li.setInfo(type='Video', infoLabels={'Title': p_name, - 'Plot': desc}) + li = ListItem(p_name, iconImage=p_thumb, thumbnailImage=p_thumb) + li.setInfo(type='Video', infoLabels=info) u = sys.argv[0] + '?mode=playvideo&title=' + p_name u += '&tvId=%d&vid=%s' % (tvId, videoId.encode('utf-8')) u += '&thumb=' + p_thumb @@ -337,7 +335,6 @@ def episodesList(params): thumb = params['thumb'] url = 'http://cache.video.qiyi.com/a/%s' % albumId - print '==========================', url link = get_html(url) data = link[link.find('=')+1:] @@ -510,9 +507,6 @@ def searchiQiyi(params): # main programs goes here ######################################### -dialog = Dialog() -pDialog = DialogProgress() - params = sys.argv[2][1:] params = dict(parse_qsl(params)) diff --git a/plugin.video.qiyi/fanart.jpg b/plugin.video.iqiyi/fanart.jpg similarity index 100% rename from plugin.video.qiyi/fanart.jpg rename to plugin.video.iqiyi/fanart.jpg diff --git a/plugin.video.qiyi/icon.png b/plugin.video.iqiyi/icon.png similarity index 100% rename from plugin.video.qiyi/icon.png rename to plugin.video.iqiyi/icon.png diff --git a/plugin.video.qiyi/plugin.video.qiyi-2.2.9.zip b/plugin.video.iqiyi/plugin.video.iqiyi-2.2.9.zip similarity index 83% rename from plugin.video.qiyi/plugin.video.qiyi-2.2.9.zip rename to plugin.video.iqiyi/plugin.video.iqiyi-2.2.9.zip index 095513b..47af26b 100644 Binary files a/plugin.video.qiyi/plugin.video.qiyi-2.2.9.zip and b/plugin.video.iqiyi/plugin.video.iqiyi-2.2.9.zip differ diff --git a/plugin.video.qiyi/resources/settings.xml b/plugin.video.iqiyi/resources/settings.xml similarity index 100% rename from plugin.video.qiyi/resources/settings.xml rename to plugin.video.iqiyi/resources/settings.xml diff --git a/plugin.video.ku6/plugin.video.ku6-1.0.5.zip b/plugin.video.ku6/plugin.video.ku6-1.0.5.zip new file mode 100644 index 0000000..6c2f2de Binary files /dev/null and b/plugin.video.ku6/plugin.video.ku6-1.0.5.zip differ diff --git a/plugin.video.ku6video/plugin.video.ku6video-1.0.0.zip b/plugin.video.ku6video/plugin.video.ku6video-1.0.0.zip new file mode 100644 index 0000000..2686063 Binary files /dev/null and b/plugin.video.ku6video/plugin.video.ku6video-1.0.0.zip differ diff --git a/plugin.video.letv/addon.xml b/plugin.video.letv/addon.xml index bb49e9e..6727c2d 100644 --- a/plugin.video.letv/addon.xml +++ b/plugin.video.letv/addon.xml @@ -5,7 +5,7 @@ provider-name="yfang1644"> - + - + - + video diff --git a/plugin.video.mgtv/plugin.video.mgtv-1.0.1.zip b/plugin.video.mgtv/plugin.video.mgtv-1.0.1.zip index 0d3c05a..ce1401e 100644 Binary files a/plugin.video.mgtv/plugin.video.mgtv-1.0.1.zip and b/plugin.video.mgtv/plugin.video.mgtv-1.0.1.zip differ diff --git a/plugin.video.my-addon/plugin.video.my-addon-1.2.4.zip b/plugin.video.my-addon/plugin.video.my-addon-1.2.4.zip new file mode 100644 index 0000000..c163c26 Binary files /dev/null and b/plugin.video.my-addon/plugin.video.my-addon-1.2.4.zip differ diff --git a/plugin.video.pptv/addon.xml b/plugin.video.pptv/addon.xml index 042bc88..2156643 100644 --- a/plugin.video.pptv/addon.xml +++ b/plugin.video.pptv/addon.xml @@ -4,7 +4,7 @@ version="1.2.13" provider-name="Uranus Zhou,yfang1644"> - + - + video diff --git a/plugin.video.qq/plugin.video.qq-1.0.4.zip b/plugin.video.qq/plugin.video.qq-1.0.4.zip index c2ae80a..62d83f5 100644 Binary files a/plugin.video.qq/plugin.video.qq-1.0.4.zip and b/plugin.video.qq/plugin.video.qq-1.0.4.zip differ diff --git a/plugin.video.rrmj/addon.xml b/plugin.video.rrmj/addon.xml index 093a6f9..4caf84f 100644 --- a/plugin.video.rrmj/addon.xml +++ b/plugin.video.rrmj/addon.xml @@ -5,7 +5,7 @@ provider-name="jindaxia,yfang1644"> - + video diff --git a/plugin.video.rrmj/plugin.video.rrmj-0.3.5.zip b/plugin.video.rrmj/plugin.video.rrmj-0.3.5.zip index 64f76fb..a38f21c 100644 Binary files a/plugin.video.rrmj/plugin.video.rrmj-0.3.5.zip and b/plugin.video.rrmj/plugin.video.rrmj-0.3.5.zip differ diff --git a/plugin.video.sohuvideo/addon.xml b/plugin.video.sohuvideo/addon.xml index 2562b13..870fd68 100644 --- a/plugin.video.sohuvideo/addon.xml +++ b/plugin.video.sohuvideo/addon.xml @@ -5,7 +5,7 @@ provider-name="Taxigps,yfang1644"> - + 3 else 1 li = ListItem(BANNER_FMT % (name+'【第%d页】(分类过滤)' % (page))) - u = sys.argv[0] + '?url=' + urllib.quote_plus(url) + u = sys.argv[0] + '?url=' + quote_plus(url) u += '&mode=select&name=' + name xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) items = tree.find_all('ul', {'class': 'st-list'}) items = items[0].find_all('li') + for item in items: pic = item.find('div', {'class': 'st-pic'}) href = pic.a.get('href') @@ -145,28 +153,27 @@ def listSubMenu(params): mask = item.find('span', {'class': 'maskTx'}).text except: mask = '' - extra = '[COLOR FF8080FF]' + extra = '' auth = item.find('span', {'class': 'rl-hyuan'}) if auth: - extra += u'会员 ' + extra += EXTRA % u'会员 ' auth = item.find('span', {'class': 'rl-dbo'}) if auth: - extra += u'独播' - extra += '[/COLOR]' + extra += EXTRA % u'独播' - li = ListItem(title + ' ' + mask + ' ' + extra, + li = ListItem(title + ' ' + mask + extra, iconImage=img, thumbnailImage=img) li.setInfo(type='Video', infoLabels={'Title': title, 'Plot': info}) if name in ('电视剧', '动漫', '综艺', '娱乐', '纪录片', '明星', '体育'): mode = 'episodelist1' - elif name in ('搞笑', '游戏', '新闻', '做饭', '科技', '学习考试', '自媒体'): + elif name in ('搞笑', '游戏', '做饭', '科技', '学习考试', '自媒体'): mode = 'episodelist2' else: mode = 'playvideo' u = sys.argv[0] + '?url=' + href u += '&mode=' + mode - u += '&name=' + urllib.quote_plus(name) - u += '&thumb=' + urllib.quote_plus(img) + u += '&name=' + quote_plus(name) + u += '&thumb=' + quote_plus(img) u += '&title=' + title xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) @@ -177,12 +184,12 @@ def listSubMenu(params): pages = tree.find_all('div', {'class': 'ssPages area'}) pages = pages[0].find_all('a') for page in pages: - title = page['title'] + title = page['title'].encode('utf-8') href = httphead(page['href']) li = ListItem(title) u = sys.argv[0] + '?url=' + href u += '&mode=videolist' - u += '&name=' + urllib.quote_plus(name) + u += '&name=' + quote_plus(name) xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) xbmcplugin.setContent(int(sys.argv[1]), 'movies') @@ -203,7 +210,6 @@ def normalSelect(params): for item in filter: title = item.dt.text - title = re.sub('\t|\n|\r', '', title) si = item.find_all('a') list = [] for x in si: @@ -237,155 +243,61 @@ def episodesList1(params): link = get_html(url) match0 = re.compile('var playlistId\s*=\s*["|\'](.+?)["|\'];', re.DOTALL).findall(link) - if match0 is not None: + match0 += re.compile('var PLAYLIST_ID\s*=\s*["|\'](.+?)["|\'];', re.DOTALL).findall(link) + + if len(match0) > 0: listapi = 'http://hot.vrs.sohu.com/vrs_videolist.action?' - link = get_html(listapi + 'playlist_id=' + match0[0]) - match = re.compile('"videoImage":"(.+?)",.+?"videoUrl":"(.+?)".+?"videoId":(.+?),.+?"videoOrder":"(.+?)",', re.DOTALL).findall(link) - totalItems = len(match) + listapi = 'http://pl.hd.sohu.com/videolist?playlistid=9395603&order=0&cnt=1&withLookPoint=1&preVideoRule=1' + listapi = 'http://pl.hd.sohu.com/videolist?playlistid=%s' + + link = get_html(listapi % match0[0], decoded=False) + items = loads(link.decode('gbk'))['videos'] + + for item in items: + p_name = item['showName'].encode('utf-8') + p_thumb = item['largePicUrl'].encode('utf-8') + p_url = item['pageUrl'].encode('utf-8') + p_vid = str(item['vid']).encode('utf-8') + p_tvId = str(item['tvId']).encode('utf-8') + info = { + 'label': p_name, + 'duration': int(item['playLength']), + 'plot': item['videoDesc'], + 'episode': int(item['order']) + } - for p_thumb, p_url, p_vid, p_order in match: - p_name = '%s第%s集' % (title0, p_order.encode('utf-8')) li = ListItem(p_name, iconImage='', thumbnailImage=p_thumb) - li.setInfo(type="Video", - infoLabels={"Title": p_name, "episode": int(p_order)}) - u = sys.argv[0] + '?url=' + urllib.quote_plus(p_url) + '&mode=playvideo' - u += '&name=' + name + '&title=' + urllib.quote_plus(p_name) - u += '&thumb=' + urllib.quote_plus(p_thumb) - u += '&vid=' + p_vid.encode('utf-8') - xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, False, totalItems) - else: - match0 = re.compile('var pid\s*=\s*(.+?);', re.DOTALL).findall(link) - if len(match0) > 0: - # print 'pid=' + match0[0] - pid = match0[0].replace('"', '') - match0 = re.compile('var vid\s*=\s*(.+?);', re.DOTALL).findall(link) - vid = match0[0].replace('"', '') - if vid == '0': - Dialog.ok(__addonname__, '当前节目暂不能播放') - - obtype = '2' - s_api = 'http://search.vrs.sohu.com/v?id=%s&pid=%s&pageNum=1&pageSize=' - s_api = 'http://search.vrs.sohu.com/avs_i%s_pr%s_o2_n_p1000_chltv.sohu.com.json' - link = get_html(s_api % (vid, pid)) - link = link[link.find('=')+1:] - data = link.decode('raw_unicode_escape') - match = loads(data)['videos'] - totalItems = len(match) - for item in match: - p_name = item['videoName'].encode('utf-8') - p_url = item['videoUrl'].encode('utf-8') - p_thumb = item['videoBigPic'].encode('utf-8') - p_plot = item['videoDesc'].encode('utf-8') - p_rating = item['videoScore'] - p_votes = int(item['videoVoters']) - p_vid = item['vid'] - p_order = int(item['playOrder']) - try: - p_time = item['videoPublishTime'] - p_date = datetime.date.fromtimestamp(float(p_time)/1000).strftime('%d.%m.%Y') - except: - p_date = '' - li = ListItem(p_name, - iconImage='', thumbnailImage=p_thumb) - li.setInfo(type="Video", - infoLabels={"Title": p_name, - "date": p_date, - "episode": p_order, - "plot": p_plot, - "rating": p_rating, - "votes": p_votes}) - u = sys.argv[0] + '?url=' + urllib.quote_plus(p_url) - u += '&mode=playvideo&name=' + name - u += '&title=' + p_name - u += '&thumb=' + p_thumb + '&vid=%d' % p_vid - xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, False, totalItems) - else: - match = re.compile(']*)>]*)>', re.I).findall(link) - thumbDict = {} - for i in range(0, len(match)): - p_url = re.compile('href="(.+?)"').findall(match[i][0]) - if len(p_url) > 0: - p_url = p_url[0] - else: - p_url = match[i][0] - p_thumb = re.compile('src="(.+?)"').findall(match[i][1]) - if len(p_thumb) > 0: - p_thumb = p_thumb[0] - else: - p_thumb = match[i][1] - thumbDict[p_url] = p_thumb - #for img in thumbDict.items(): - url = 'http://so.tv.sohu.com/mts?c=2&wd=' + urllib.quote_plus(name) - html = get_html(url) - match = re.compile('class="serie-list(.+?)').findall(html) - if match: - items = re.compile(']*)>(.+?)', re.I).findall(match[0]) - totalItems = len(items) - for item in items: - if item[1] == '展开>>': - continue - href = re.compile('href="(.+?)"').findall(item[0]) - if len(href) > 0: - p_url = href[0] - urlKey = re.compile('u=(http.+?.shtml)').search(p_url) - if urlKey: - urlKey = urllib.unquote(urlKey.group(1)) - else: - urlKey = p_url - # print urlKey - p_thumb = thumbDict.get(urlKey, thumb) - #title = re.compile('title="(.+?)"').findall(item) - #if len(title)>0: - #p_name = title[0] - p_name = title0 + '第' + item[1].strip() + '集' - li = ListItem(p_name, - iconImage=p_thumb, thumbnailImage=p_thumb) - u = sys.argv[0] + '?url=' + urllib.quote_plus(p_url) - u += '&mode=playvideo&name=' + name - u += '&title=' + urllib.quote_plus(p_name) - u += '&thumb=' + urllib.quote_plus(p_thumb) - xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, False) + li.setInfo(type="Video", infoLabels=info) + u = sys.argv[0] + '?url=' + quote_plus(p_url) + '&mode=playvideo' + u += '&name=' + name + '&title=' + p_name + u += '&thumb=' + quote_plus(p_thumb) + u += '&vid={}&tvId={}'.format(p_vid , p_tvId) + xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, False) - tree = BeautifulSoup(link, 'html.parser') - soup1 = tree.find_all('ul', {'class': 'list listA cfix'}) - soup2 = tree.find_all('ul', {'class': 'list list-120 cfix'}) - - if len(soup1) > 1: - for part in soup1[1:]: - drama = part.find_all('li') - for item in drama: - img = httphead(item.img['src']) - try: - title = item.strong.a['title'] - except: - title = item.a.text - href = httphead(item.a['href']) - li = ListItem(title, iconImage=img, thumbnailImage=img) - u = sys.argv[0] + '?url=' + href + '&mode=playvideo' - u += '&name=' + urllib.quote_plus(name) + '&thumb=' + img - u += '&title=' + title - xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, False) - - if len(soup2) > 0: - for part in soup2: - drama = part.find_all('li') - - for item in drama: - img = httphead(item.img['src']) - try: - title = item.strong.a['title'] - except: - title = item.a.text - href = httphead(item.a['href']) - li = ListItem(title, iconImage=img, thumbnailImage=img) - li.setInfo(type='Video', infoLabels={'Title': title}) - u = sys.argv[0] + '?url=' + href + '&mode=episodelist1' - u += '&name=' + urllib.quote_plus(name) + '&thumb=' + img - u += '&title=' + title - xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) - - #xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_EPISODE) - #xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_DATE) + else: + tree = BeautifulSoup(link, 'html.parser') + soup2 = tree.find_all('ul', {'class': 'list list-120 cfix'}) + + if len(soup2) > 0: + for part in soup2: + drama = part.find_all('li') + + for item in drama: + img = httphead(item.img['src']) + try: + title = item.strong.a['title'] + except: + title = item.a.text + href = httphead(item.a['href']) + li = ListItem(title, iconImage=img, thumbnailImage=img) + li.setInfo(type='Video', infoLabels={'Title': title}) + u = sys.argv[0] + '?url=' + href + '&mode=episodelist1' + u += '&name=' + quote_plus(name) + '&thumb=' + img + u += '&title=' + title + xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) + + #xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_EPISODE) + #xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_DATE) xbmcplugin.setContent(int(sys.argv[1]), 'episodes') xbmcplugin.endOfDirectory(int(sys.argv[1])) @@ -414,10 +326,10 @@ def episodesList2(params): p_order = int(item['order']) vid = item['vid'] li = ListItem(p_name, iconImage='', thumbnailImage=p_thumb) - u = sys.argv[0] + '?url=' + urllib.quote_plus(p_url) + u = sys.argv[0] + '?url=' + quote_plus(p_url) u += '&mode=playvideo&name=' + name - u += '&title=' + urllib.quote_plus(p_name) - u += '&thumb=' + urllib.quote_plus(p_thumb) + u += '&title=' + quote_plus(p_name) + u += '&thumb=' + quote_plus(p_thumb) u += '&vid=%d' % vid xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, False) @@ -449,12 +361,15 @@ def LiveChannel(params): u = sys.argv[0] + '?mode=liveplay&id=%d' % id u += '&name=' + name + '&title=' + title - u += '&thumb=' + urllib.quote_plus(p_thumb) + u += '&thumb=' + quote_plus(p_thumb) html = get_html(PROGRAM_URL % id) schedule = '' try: program = loads(html) + except: + continue + try: program = program['attachment'][0]['MENU_LIST'] except: continue @@ -499,7 +414,7 @@ def searchSohu(params): keyword = keyboard.getText() p_url = 'http://so.tv.sohu.com/mts?chl=&tvType=-2&wd=' - url = p_url + urllib.quote_plus(keyword) + url = p_url + quote_plus(keyword) # construct url based on user selected item page = 1 @@ -530,9 +445,9 @@ def searchSohu(params): info = '' li = ListItem(p_name, iconImage=img, thumbnailImage=img) li.setInfo(type='Video', infoLabels={'Title': p_name, 'Plot': info}) - u = sys.argv[0] + '?url=' + urllib.quote_plus(p_url) - u += '&mode=episodelist&title=' + urllib.quote_plus(p_name) - u += '&thumb=' + urllib.quote_plus(img) + u = sys.argv[0] + '?url=' + quote_plus(p_url) + u += '&mode=episodelist&title=' + quote_plus(p_name) + u += '&thumb=' + quote_plus(img) xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) album = page.find_all('a', {'class': 'ts'}) @@ -540,8 +455,8 @@ def searchSohu(params): title = series['title'] href = httphead(series['href']) li = ListItem(title) - u = sys.argv[0] + '?url=' + urllib.quote_plus(href) - u += '&mode=playvideo&title=' + urllib.quote_plus(title) + u = sys.argv[0] + '?url=' + quote_plus(href) + u += '&mode=playvideo&title=' + quote_plus(title) xbmcplugin.addDirectoryItem(int(sys.argv[1]), u, li, True) xbmcplugin.setContent(int(sys.argv[1]), 'movies') diff --git a/plugin.video.sohuvideo/plugin.video.sohuvideo-2.4.11.zip b/plugin.video.sohuvideo/plugin.video.sohuvideo-2.4.11.zip index edcca61..e21e61d 100644 Binary files a/plugin.video.sohuvideo/plugin.video.sohuvideo-2.4.11.zip and b/plugin.video.sohuvideo/plugin.video.sohuvideo-2.4.11.zip differ diff --git a/plugin.video.tudou/addon.xml b/plugin.video.tudou/addon.xml index a1990a9..b6ae2f5 100644 --- a/plugin.video.tudou/addon.xml +++ b/plugin.video.tudou/addon.xml @@ -4,7 +4,7 @@ version="1.0.0" provider-name="yfang1644"> - + - + video diff --git a/plugin.video.youku2/plugin.video.youku2-1.0.1.zip b/plugin.video.youku2/plugin.video.youku2-1.0.1.zip index 2e9026a..a9b8069 100644 Binary files a/plugin.video.youku2/plugin.video.youku2-1.0.1.zip and b/plugin.video.youku2/plugin.video.youku2-1.0.1.zip differ diff --git a/plugin.video.youkutv/addon.xml b/plugin.video.youkutv/addon.xml index b0240d4..40f5ab7 100644 --- a/plugin.video.youkutv/addon.xml +++ b/plugin.video.youkutv/addon.xml @@ -5,7 +5,7 @@ - + video diff --git a/plugin.video.youkutv/plugin.video.youkutv-1.7.8.zip b/plugin.video.youkutv/plugin.video.youkutv-1.7.8.zip index 8a7a338..f3ad1c5 100644 Binary files a/plugin.video.youkutv/plugin.video.youkutv-1.7.8.zip and b/plugin.video.youkutv/plugin.video.youkutv-1.7.8.zip differ diff --git a/plugin.video.youkuvideo/plugin.video.youkuvideo-1.0.0.zip b/plugin.video.youkuvideo/plugin.video.youkuvideo-1.0.0.zip new file mode 100644 index 0000000..decf3ac Binary files /dev/null and b/plugin.video.youkuvideo/plugin.video.youkuvideo-1.0.0.zip differ diff --git a/repository.xbmc-chinese-videos/repository.xbmc-chinese-videos-1.0.1.zip b/repository.xbmc-chinese-videos/repository.xbmc-chinese-videos-1.0.1.zip deleted file mode 100644 index f6b2efb..0000000 Binary files a/repository.xbmc-chinese-videos/repository.xbmc-chinese-videos-1.0.1.zip and /dev/null differ diff --git a/script.common.plugin.cache/script.common.plugin.cache-2.5.8.zip b/script.common.plugin.cache/script.common.plugin.cache-2.5.8.zip index de63dfa..1ebae96 100644 Binary files a/script.common.plugin.cache/script.common.plugin.cache-2.5.8.zip and b/script.common.plugin.cache/script.common.plugin.cache-2.5.8.zip differ