Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youku 的解析失效了 #137

Closed
mengmo opened this issue May 10, 2018 · 15 comments
Closed

Youku 的解析失效了 #137

mengmo opened this issue May 10, 2018 · 15 comments
Labels
bug Something isn't working youku

Comments

@mengmo
Copy link

mengmo commented May 10, 2018

annie -i -d https://v.youku.com/v_show/id_XNDYzODE0MjY0.html

�[36mannie�[0m: version �[34m0.6.11�[0m, A fast, simple and clean video downloader.


URL:         http://log.mmstat.com/eg.js
Method:      GET
Headers:     http.Header{
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Referer":         {"https://v.youku.com"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XNDYzODE0MjY0&ccode=0502&client_ip=192.168.1.1&client_ts=1525951&utid=mxl7E06XFz0CASrs2aCPL0VV&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Referer":         {"https://v.youku.com"},
}
Status Code: 200
2018/05/10 19:23:08 用户账户异常、请重新登录
@iawia002
Copy link
Owner

33af2e1 已经修复了,下个版本就好了

@iawia002 iawia002 added bug Something isn't working youku labels May 10, 2018
@mengmo
Copy link
Author

mengmo commented May 10, 2018

花了不少时间搞出来了,然而Title是什么情况?怎么好像有奇怪的东西跑进去了?

annie -i https://v.youku.com/v_show/id_XMzk1MTY5NjA4.html

 Site:      优酷 youku.com
 Title:     肉山大魔王石 第05话 像要融化一般
 Type:      video
 Streams:   # All available quality
     [3gphd]  -------------------
     Quality:         3gphd 512x288
     Size:            51.49 MiB (53990006 Bytes)
     # download with: annie -f 3gphd "URL"

     [flvhd]  -------------------
     Quality:         flvhd 512x288
     Size:            48.65 MiB (51008849 Bytes)
     # download with: annie -f flvhd "URL"

     [default]  -------------------
     Quality:         mp4hd 672x378
     Size:            93.63 MiB (98176545 Bytes)
     # download with: annie -f default "URL"

@mengmo
Copy link
Author

mengmo commented May 10, 2018

还有另外一个问题,视频文件只下载一半就认定为下载完成,开始合并了。

@iawia002 iawia002 reopened this May 11, 2018
@iawia002
Copy link
Owner

标题我马上改一下,下载一半就合并这个问题以前出现过,修复了,现在又出现了,暂时解决不了 #43 #79

@mengmo
Copy link
Author

mengmo commented May 11, 2018

又试了试,看情况应该是撞到了这个限制:优酷移动端网页长点儿的视频强制性得只能试看10分钟,而优酷给的视频分段也就只有前10分钟多点儿的。

annie https://v.youku.com/v_show/id_XMTU3NzY2NjM5Ng.html

 Site:      优酷 youku.com
 Title:     秒速5厘米 日文版 秒速5厘米 日文版
 Type:      video
 Stream:
     [default]  -------------------
     Quality:         mp4hd2 1280x720
     Size:            735.03 MiB (770732578 Bytes)
     # download with: annie -f default "URL"

 140.67 MiB / 735.03 MiB [=============>-------------------------------------------------------]  19.14% 7.55 MiB/s 18s
Merging video parts into 秒速5厘米 日文版 秒速5厘米 日文版.mp4
ffprobe -i "秒速5厘米 日文版 秒速5厘米 日文版.mp4"
ffprobe version 4.0 Copyright (c) 2007-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '绉掗€?鍘樼背 鏃ユ枃鐗?绉掗€?鍘樼背 鏃ユ枃鐗?mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:13:00.66, start: 0.000000, bitrate: 1508 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1374 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

@mengmo
Copy link
Author

mengmo commented May 11, 2018

好像找到原因了
annie 将 https://github.com/iawia002/annie/blob/master/extractors/youku.go#L55 中除了0590外全部请求了一边,然而因为每次请求的响应都会覆盖前一次的响应。

annie -i -d https://v.youku.com/v_show/id_XMTU3NzY2NjM5Ng.html

�[36mannie�[0m: version �[34m0.6.11�[0m, A fast, simple and clean video downloader.


URL:         http://log.mmstat.com/eg.js
Method:      GET
Headers:     http.Header{
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "Referer":         {"https://v.youku.com"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0502&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Referer":         {"https://v.youku.com"},
    "Accept-Language": {"en-US,en;q=0.8"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0507&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Referer":         {"https://v.youku.com"},
    "Accept-Language": {"en-US,en;q=0.8"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0508&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "Referer":         {"https://v.youku.com"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0512&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "Referer":         {"https://v.youku.com"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0513&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Referer":         {"https://v.youku.com"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0514&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "Referer":         {"https://v.youku.com"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
}
Status Code: 200

URL:         https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0503&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND
Method:      GET
Headers:     http.Header{
    "Referer":         {"https://v.youku.com"},
    "Accept-Charset":  {"UTF-8,*;q=0.5"},
    "Accept-Encoding": {"gzip,deflate,sdch"},
    "Accept-Language": {"en-US,en;q=0.8"},
    "User-Agent":      {"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"},
    "Accept":          {"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
}
Status Code: 200

 Site:      优酷 youku.com
 Title:     秒速5厘米 日文版 秒速5厘米 日文版
 Type:      video
 Streams:   # All available quality
     [mp4hd]  -------------------
     Quality:         mp4hd 960x540
     Size:            388.91 MiB (407802618 Bytes)
     # download with: annie -f mp4hd "URL"

     [3gphd]  -------------------
     Quality:         3gphd 640x360
     Size:            135.13 MiB (141694109 Bytes)
     # download with: annie -f 3gphd "URL"

     [flvhd]  -------------------
     Quality:         flvhd 640x360
     Size:            188.14 MiB (197274014 Bytes)
     # download with: annie -f flvhd "URL"

     [default]  -------------------
     Quality:         mp4hd2 1280x720
     Size:            735.03 MiB (770732578 Bytes)
     # download with: annie -f default "URL"

实际请求0503的结果确实如此

http "https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0503&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND" "Referer: https://v.youku.com/v_show/id_XMTU3NzY2NjM5Ng.html" "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"
为便于浏览,原内容删去。(对讨论无影响)
annie -i -j https://v.youku.com/v_show/id_XMTU3NzY2NjM5Ng.html
为便于浏览,原内容删去。(对讨论无影响)

@mengmo
Copy link
Author

mengmo commented May 11, 2018

实际请求0502的结果,这个应该是最完整的
然而,由于 annie 的 default User-Agent 的关系(结果在最下边)

http "https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0502&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND" "Referer: https://v.youku.com/v_show/id_XMTU3NzY2NjM5Ng.html" "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36"
为便于浏览,原内容删去。(对讨论无影响)

然而,由于 annie 的 default User-Agent 的关系

http "https://ups.youku.com/ups/get.json?vid=XMTU3NzY2NjM5Ng&ccode=0502&client_ip=192.168.1.1&client_ts=1526072&utid=b%2FR8E2Ez4gQCASrs1hQIdjPN&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu%2F86PR1u%2FWh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1%2FY6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo%2F0y9D2K42SaB8Y%2F%2BaD2K42SaB8Y%2F%2BahU%2BWOZsHcrxysooUeND" "Referer: https://v.youku.com/v_show/id_XMTU3NzY2NjM5Ng.html" "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 156
Content-Type: text/plain;charset=UTF-8
Date: Fri, 11 May 2018 21:32:30 GMT
Server: Tengine/Aserver
Strict-Transport-Security: max-age=0
Timing-Allow-Origin: *
s-rt: 29

{
    "cost": 0.02800000086426735,
    "data": {
        "error": {
            "code": -6005,
            "note": "用户账户异常、请重新登录"
        }
    },
    "e": {
        "code": 0,
        "desc": "",
        "provider": "hsfprovider"
    }
}

@iawia002
Copy link
Owner

看情况应该是撞到了这个限制:优酷移动端网页长点儿的视频强制性得只能试看10分钟,而优酷给的视频分段也就只有前10分钟多点儿的。

应该是这个原因

好像找到原因了
annie 将 https://github.com/iawia002/annie/blob/master/extractors/youku.go#L55 中除了0590外全部请求了一边,然而因为每次请求的响应都会覆盖前一次的响应。

不是这样的,我是一个一个的试,直到有数据就返回,不会再请求下去的

UA 我马上改一下试试

@mengmo
Copy link
Author

mengmo commented May 12, 2018

直接访问第一个 URL

{"cost":0.003000000026077032,"data":{"error":{"note":"客户端无权播放,201","code":-6004}},"e":{"code":0,"provider":"hsfprovider","desc":""}}

直接访问第二个确实和上边描述的一致


就我测试的结果来看:RefererUser-Agent两者都是必须的。直接访问的话,Referer就不对了
不过,刚我又测试下,又不行了。
难道是现在同一个 api url 只能访问一次了?

@mengmo
Copy link
Author

mengmo commented May 12, 2018

看来,优酷对于第三方调用其 api 动手了,刚试了好多次,结果直接打开
https://v.youku.com/v_show/id_XMzk1MTY5NjA4.html 网页都不能直接看视频了

另外,刚换了个视频地址,发现我这儿当前的 api url 是这样的

https://acs.youku.com/h5/mtop.youku.play.ups.appinfo.get/1.1/?jsv=2.4.11&appKey=24679788&t=1526146321739&sign=1cb8b917bf7a8684914d9f63131bdf0d&api=mtop.youku.play.ups.appinfo.get&v=1.1&timeout=20000&YKPid=20160317PLF000211&YKLoginRequest=true&type=jsonp&dataType=jsonp&callback=mtopjsonp1&data=%7B%22steal_params%22%3A%22%7B%5C%22ccode%5C%22%3A%5C%220502%5C%22%2C%5C%22client_ip%5C%22%3A%5C%22192.168.1.1%5C%22%2C%5C%22utid%5C%22%3A%5C%22mc8OEruxGBsCAXM8dmuMAOY6%5C%22%2C%5C%22client_ts%5C%22%3A1526146321%2C%5C%22ckey%5C%22%3A%5C%22108%23Wib%2F1%2Fc%2F%2FYIepZxucbKaDWExIgN9cLd80l3JIfmrEb9%2F%2FlFH0%2F%2F4%2FvE28JU%2BbFp1Po1hW5mj4E26PiCRcff2Tc9YyqHg2f84C64GKAp%2BpkSrOkhOmNtUyCFWsPmQop3EcAnuqrRULuyUaR7W9UeZ36NuHqi2Qcl9OuPirYxJKObu8abjiNT0N92QwoM0jWatMXkCEKTaQx5COLxvU2Kf%2B3no7z6dWOWwVn4dpZzlioGf4NX1cVmlgoR7dmm%2FeAwzTp2rW78qBFF9%2BS1nkvVIlc5CO67eixWxKwrbkRsuWt6fZcRmWtwgrkqCTGkfo6AzaJH88d7bS3cTGnLYle0UYRsw3ODIZtNvUuJic%2F%3D%3D%5C%22%7D%22%2C%22biz_params%22%3A%22%7B%5C%22vid%5C%22%3A%5C%22XNDAxNTkwMTUy%5C%22%2C%5C%22current_showid%5C%22%3A%5C%22249580%5C%22%7D%22%2C%22ad_params%22%3A%22%7B%5C%22site%5C%22%3A1%2C%5C%22wintype%5C%22%3A%5C%22interior%5C%22%2C%5C%22p%5C%22%3A1%2C%5C%22fu%5C%22%3A0%2C%5C%22vs%5C%22%3A%5C%221.0%5C%22%2C%5C%22rst%5C%22%3A%5C%22mp4%5C%22%2C%5C%22dq%5C%22%3A%5C%22mp4%5C%22%2C%5C%22os%5C%22%3A%5C%22win%5C%22%2C%5C%22osv%5C%22%3A%5C%22%5C%22%2C%5C%22d%5C%22%3A%5C%220%5C%22%2C%5C%22bt%5C%22%3A%5C%22pc%5C%22%2C%5C%22aw%5C%22%3A%5C%22w%5C%22%2C%5C%22needbf%5C%22%3A1%7D%22%7D

@iawia002
Copy link
Owner

@lleeopen 0510 我试了几个都可以,除了 http://v.youku.com/v_show/id_XMzQ1MTAzNjQwNA==.html

我先发个版本吧

@maximum-proo
Copy link

@iawia002 https://v.youku.com/v_show/id_XMjk4MDIxNzUzNg==.html 这部电视剧好像都不行呢?

@iawia002
Copy link
Owner

@maximum-proo 0510 是有些不行,但是其他的基本都是只能下前几分钟的,0510 能下的都是完整的

@maximum-proo
Copy link

我这跟@mengmo 一样,网页里api都是这个地址了,主要是ckey参数不知道怎么获取的,抓包只能用2-3次 https://acs.youku.com/h5/mtop.youku.play.ups.appinfo.get/1.1/?jsv=2.4.11&appKey=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working youku
Projects
None yet
Development

No branches or pull requests

3 participants