Skip to content

Commit

Permalink
[plugin.video.youku] 2.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
taxigps committed May 27, 2017
1 parent 107ec0b commit 519a840
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addons.xml
Expand Up @@ -608,7 +608,7 @@ For Non-PRC OS environment (Windows7|WindowsXP):[CR]"Control Panel"|"Region and

<addon id="plugin.video.youku"
name="优酷视频(YouKu)"
version="2.2.6"
version="2.2.7"
provider-name="Taxigps">
<requires>
<import addon="script.module.simplejson" version="3.3.0"/>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
@@ -1 +1 @@
62c7ed642046de9bccd0d8e3e3b1be4e
f996c8b759f6cba8a450155665a75869
2 changes: 1 addition & 1 deletion plugin.video.youku/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.youku"
name="优酷视频(YouKu)"
version="2.2.6"
version="2.2.7"
provider-name="Taxigps">
<requires>
<import addon="script.module.simplejson" version="3.3.0"/>
Expand Down
5 changes: 4 additions & 1 deletion plugin.video.youku/changelog.txt
@@ -1,4 +1,7 @@
V2.2.6 2017-05-21
V2.2.7 2017-05-27
- fixed: video url extraction

V2.2.6 2017-05-21
- add message for vip program
- remove unused code

Expand Down
24 changes: 21 additions & 3 deletions plugin.video.youku/default.py
Expand Up @@ -397,7 +397,16 @@ def selResolution(streamtypes):
return streamtypes[ratelist[sel][2]], ratelist[sel][1], ratelist[sel][2], ratelist[sel][3]

def PlayVideo(name,id,thumb):
url = 'http://play.youku.com/play/get.json?vid=%s&ct=12' % (id)
res = urllib2.urlopen('https://log.mmstat.com/eg.js')
cna = res.headers['etag'][1:-1]
query = urllib.urlencode(dict(
vid = id,
ccode = '0401',
client_ip = '192.168.1.1',
utid = cna,
client_ts = time.time() / 1000
))
url = 'https://ups.youku.com/ups/get.json?%s' % (query)
link = GetHttpData(url, referer='http://static.youku.com/')
json_response = simplejson.loads(link)
movdat = json_response['data']
Expand All @@ -421,14 +430,22 @@ def PlayVideo(name,id,thumb):
name = '%s %s' % (name, langlist[i]['lang'].encode('utf-8'))
break
if vid != id:
url = 'http://play.youku.com/play/get.json?vid=%s&ct=12' % (vid)
query = urllib.urlencode(dict(
vid = id,
ccode = '0401',
client_ip = '192.168.1.1',
utid = cna,
client_ts = time.time() / 1000
))
url = 'https://ups.youku.com/ups/get.json?%s' % (query)
link = GetHttpData(url, referer='http://static.youku.com/')
json_response = simplejson.loads(link)
movdat = json_response['data']

streamtypes = [stream['stream_type'].encode('utf-8') for stream in movdat['stream']]
typeid, typename, streamno, resolution = selResolution(streamtypes)
if typeid:
'''
oip = movdat['security']['ip']
ep = movdat['security']['encrypt_string']
sid, token = youkuDecoder().get_sid(ep)
Expand Down Expand Up @@ -476,7 +493,8 @@ def PlayVideo(name,id,thumb):
json_response = simplejson.loads(link)
urls.append(json_response[0]['server'].encode('utf-8'))
movurl = 'stack://' + ' , '.join(urls)

'''
movurl = movdat['stream'][streamno]['m3u8_url']
name = '%s[%s]' % (name, typename)
listitem=xbmcgui.ListItem(name,thumbnailImage=thumb)
listitem.setInfo(type="Video",infoLabels={"Title":name})
Expand Down
45 changes: 45 additions & 0 deletions repo/plugin.video.youku/changelog-2.2.7.txt
@@ -0,0 +1,45 @@
V2.2.7 2017-05-27
- fixed: video url extraction

V2.2.6 2017-05-21
- add message for vip program
- remove unused code

V2.2.5 2017-05-06
- fixed: web site changed

V2.2.4 2015-12-12
- fixed: video url analysis method changed and need cookie support

V2.2.3 2015-09-27
- changed: default play method not use m3u8
- added: requires for script.module.simplejson

V2.2.2 2015-05-10
- fixed: can't get play url for 电影, 电视剧 and 综艺 channel

V2.2.1 2014-09-29
- Fix import error of simplejson

V2.2.0 2014-06-22
- fixed: can't play video because site change

V2.1.9 2014-01-17
- fixed: can't get 教育 and 纪录片 channel

V2.1.8 2014-01-01
- fixed: can't get video list because site change
- added: play video in 1080P resolution

V2.1.7 2013-05-17
- added: language selection for 国语 and 粤语

V2.1.4 2013-03-21
- changed play video with playlist to stacked urls to smooth play between clips

V2.1.3 2012-12-11
- changed: get rid of items not have video link

V2.1.2 2012-08-20 (cmeng)
- add multi-pages selection for easy access
- add segment numbering in playlist for reference
Binary file not shown.

0 comments on commit 519a840

Please sign in to comment.