Open ellicefix opened 6 years ago
I am not familiar with youku but
Is it just me, or the link redirects to youku 404 page?
Have you tried you-get? you-get 對於中國網站的支持比較好些 https://github.com/soimort/you-get/wiki/中文说明
The same question, pls debug it. thanks!
[youku] XMzA4MjIyNzQ3Ng: Retrieving cna info [youku] XMzA4MjIyNzQ3Ng: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using th e latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
This is youku: http://www.youku.com Please try any video on youku,and you will see the ERROR information。 This is the biggest video website in China,Just like YouTuBe to you. Please Debug it,thank.
Duplicate of #14815.
The latest version 2017-12-14 still have this question, expect to debug it
Can anyone test ccode = 0512 for your favorite videos? Lots of URLs here block users outside Mainland China, so I can't test them.
The version 2017-12-14:
$ youtube-dl --version
2017.12.14
$ youtube-dl -F http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.topNav.1~3~1~3!4~A youtube-dl -F http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.topNav.1~3~1~3sudo apt install shutter~A [youku] XMzIwMzg4NTkyOA: Retrieving cna info [youku] XMzIwMzg4NTkyOA: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@ellicefix are you using ccode 0512?
@yan12125 what is 'ccode 0512'?
@ellicefix: Change the number in this line: https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youku.py#L157. 0501 does not work anymore. Please try 0512.
@yan12125 Sorry,I don’t know how to build youtube-dl ,there are many errors when I try to build it.
i have tried to change the ccode number in 'usr/lib/python3/dist-packages/youtube_dl/extractor/youku.py',and then,the ERROR was the same:
$ youtube-dl -F http://v.youku.com/v_show/id_XMzIzNTkyNzYyOA==.html?spm=a2hmv.20009921.posterMovieGrid86981.5~5~5~1~3!2~A youtube-dl -F http://v.youku.com/v_show/id_XMzIzNTkyNzYyOA==.html?spm=a2hmv.20009921.posterMovieGrid86981.5~5~5~1~3sudo ./qt.sh~A [youku] XMzIzNTkyNzYyOA: Retrieving cna info [youku] XMzIzNTkyNzYyOA: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
I have tried ccode 0508&0512,they can't work
@ellicefix: Could you run youtube-dl -vF http://v.youku.com/v_show/id_XMzIzNTkyNzYyOA==.html
and paste the output? I guess you didn't change the correct file. With @zhangn1985's confirmation, I tend to believe those ccode values are correct as he is prestigious for his ongoing awesome work on ykdl.
@yan12125
报错信息如下:
lin@lin-PC:~$ youtube-dl -vF http://v.youku.com/v_show/id_XMzIzNTkyNzYyOA==.html [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-vF', u'http://v.youku.com/v_show/id_XMzIzNTkyNzYyOA==.html'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.12.14 [debug] Python version 2.7.13+ - Linux-4.9.0-deepin13-amd64-x86_64-with-Deepin-15.5-unstable [debug] exe versions: ffmpeg 3.3.2-1, ffprobe 3.3.2-1, rtmpdump 2.4 [debug] Proxy map: {} [youku] XMzIzNTkyNzYyOA: Retrieving cna info [youku] XMzIzNTkyNzYyOA: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 784, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 437, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youku.py", line 189, in _real_extract raise ExtractorError(msg) ExtractorError: Youku server reported error -6004: \u5ba2\u6237\u7aef\u65e0\u6743\u64ad\u653e,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@ellicefix: The active installationn is /usr/local/bin/youtube-dl. That's a compressed file so it's hard to modify its contents. Consider removing both /usr/local/bin/youtube-dl as well as the one in /usr/lib/python3/dist-packages/youtube_dl (most likely installed via apt-get or dpkg), installing youtube-dl again via pip, and modifying youku.py as described above.
@yan12125 Thank you,I install it by pip,and then modify the ccode to ‘0512’,I can download the video from youku now.And I find an interesting things:
the youku's url include 『!』,youtube-dl will prompts an error,but,when I use single quote mark,no error any longer,Here:
lin@lin-PC:$ youtube-dl -U It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update. lin@lin-PC:$ youtube-dl -F http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.topNav.1~3~1~3!4~A youtube-dl -F http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.topNav.1~3~1~3./yong-tool.sh --select~A Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: no such option: --select~A lin@lin-PC:$ youtube-dl -F 'http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.topNav.1~3~1~3!4~A' [youku] XMzIwMzg4NTkyOA: Retrieving cna info [youku] XMzIwMzg4NTkyOA: Downloading JSON metadata [info] Available formats for XMzIwMzg4NTkyOA: format code extension resolution note h5 mp4 480x270 68.62MiB h4-0 mp4 640x360 92.97MiB 2 mp4 640x360 108.65MiB h3 mp4 960x540 200.07MiB h4-1 mp4 1280x720 284.29MiB 5 mp4 1280x720 335.29MiB h4-2 mp4 1920x1080 589.75MiB 7 mp4 1920x1080 633.97MiB (best)
Thank you very much,hope you can correct ccode's mistakes in the new release. It would be better if you could be compatible with exclamation mark(!) in the link.
@ellicefix: glad to see that you've got to it. Could you also try 0507? As reported in https://github.com/rg3/youtube-dl/pull/14903#issuecomment-352967651, 0508 and 0512 are broken with some videos and 0507 always works.
About the exclamation mark issue: it's controlled by your shell and beyond the ability of youtube-dl. You may want to ask bash/zsh/... maintainers how to use exclamation marks without quotation marks.
When I use 0512 and 0508,There was indeed an interruption of downloads during the download process, but if I tried the download again, it would continue with the previous download process until the 1080p video was successfully downloaded.
0507 is not a good option because when using it, youtube-dl can not sniff the video options to 1080p.
Some of Youku's videos are only available to VIP users,and I am YouKu's VIP,Using 0508 or 0512, Youtube-dl can sniff 1080p video, which is very important to me.
when I use 0512,youtube-dl can not download the following video: http://video.tudou.com/v/XMjQ0NzA1MDQwNA==.html The message returned from htts://ups.youku.com/ups/get.json is: {"cost":0.01100000087171793,"data":{"preview":{"thumb":["http://g1.ykimg.com/0521000956FDF62A6C28817E5308352C","http://g4.ykimg.com/0521010956FDF62A6C28817E5308352C","http://g4.ykimg.com/0521020956FDF62A6C28817E5308352C","http://g3.ykimg.com/0521030956FDF62A6C28817E5308352C","http://g4.ykimg.com/0521040956FDF62A6C28817E5308352C","http://g1.ykimg.com/0521050956FDF62A6C28817E5308352C","http://g4.ykimg.com/0521060956FDF62A6C28817E5308352C","http://g1.ykimg.com/0521070956FDF62A6C28817E5308352C","http://g4.ykimg.com/0521080956FDF62A6C28817E5308352C"],"timespan":"6000"},"controller":{"yi_plus":false,"continuous":false,"share_disable":false,"download_disable":false,"is_phone_stream":"0","play_mode":1,"like_disabled":false,"stream_mode":2,"circle":false,"new_core":false,"video_capture":true},"playlog":{},"uploader":{"reason":"","crm_level":0,"uid":"UMjA4NzU5ODEy","fan_count":0,"avatar":{"small":"https://static.youku.com/user/img/avatar/30/5.jpg","big":"https://static.youku.com/user/img/avatar/80/5.jpg","middle":"https://static.youku.com/user/img/avatar/50/5.jpg","large":"https://static.youku.com/user/img/avatar/310/5.jpg"},"show_brand":0,"certification":false,"homepage":"http://i.youku.com/u/UMjA4NzU5ODEy","username":"暖气片集合地"},"ups":{"ups_ts":"1514259363","ups_client_netip":"119.145.100.138","psid":"caf48f8acec17e56d8805767dac2626e"},"video":{"category_letter_id":"f","limited":0,"privacy":"anybody","title":"枪花纪录片.BBC.Guns N' Roses.世界最危险的乐队","type":["bullet"],"userid":52189953,"encodeid":"XMjQ0NzA1MDQwNA==","tags":["音乐","音乐制作"],"seconds":5398.6,"category_id":95,"ctype":"UGC","weburl":"http://v.youku.com/v_show/id_XMjQ0NzA1MDQwNA==.html","logo":"https://vthumb.ykimg.com/0541040856FDF5C96A0A430458C4F3AE","videoid_play":611762601,"id":611762601,"username":"暖气片集合地"},"error":{"note":"抱歉,因版权原因无法观看此视频!","code":-4001},"videolike":{"like":19,"dislike":0},"user":{"uid":"","ip":"119.145.100.138","vip":false},"play_policy":{"allow":false,"policyData":{"access":"deny","desc":"播控策略 ( 版权管理 )","notice":{"code":-1,"desc":"抱歉,因版权原因无法观看此视频!"}}},"network":{"country_code":"CN","area_code":"441900","dma_code":"4134"}},"e":{"code":0,"provider":"hsfprovider","desc":""}}
@leeming87v5
What's the log?
@CoXier [youku] XMjQ0NzA1MDQwNA: Retrieving cna info [youku] XMjQ0NzA1MDQwNA: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
And run it with --verbose will produce: youtube-dl --verbose -F 'http://video.tudou.com/v/XMjQ0NzA1MDQwNA==.html' [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'-F', u'http://video.tudou.com/v/XMjQ0NzA1MDQwNA==.html'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.12.23 [debug] Python version 2.7.12 - Linux-4.4.0-97-generic-x86_64-with-Ubuntu-16.04-xenial [debug] exe versions: avconv 2.8.11-0ubuntu0.16.04.1, avprobe 2.8.11-0ubuntu0.16.04.1, ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1 [debug] Proxy map: {} [youku] XMjQ0NzA1MDQwNA: Retrieving cna info [youku] XMjQ0NzA1MDQwNA: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 784, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 438, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youku.py", line 189, in _real_extract raise ExtractorError(msg) ExtractorError: Youku server reported error -6004: \u5ba2\u6237\u7aef\u65e0\u6743\u64ad\u653e,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
I guess you have modified youku.py file because youtube-dl should print log
Youku said: Sorry, this video is available in China only
if error:
error_note = error.get('note')
if error_note is not None and '因版权原因无法观看此视频' in error_note:
raise ExtractorError(
'Youku said: Sorry, this video is available in China only', expected=True)
elif error_note and '该视频被设为私密' in error_note:
raise ExtractorError(
'Youku said: Sorry, this video is private', expected=True)
else:
msg = 'Youku server reported error %i' % error.get('code')
if error_note is not None:
msg += ': ' + error_note
raise ExtractorError(msg)
@CoXier OK, then. Thank you very much. you're right, this video is available in China only. It seems i should download it manually.
Now none of 0507, 0508 and 0512 works.
@yan12125
0512 not work now!
Any solution?
@zhangn1985
0502 youtube-dl 不可以 ykdl 可以 产生的url如下
youtube-dl:
https://ups.youku.com/ups/get.json?vid=XMzQ3MDQ4MjU0MA&ccode=0502&client_ip=192.168.1.1&utid=cRU6EybbLQ4CAbczegyEEM3w&client_ts=1521690.4818922966
ykdl:
https://ups.youku.com/ups/get.json?vid=XMzQ3ODQ0OTA2MA==&ccode=0502&client_ip=192.168.1.1&utid=bhQ6E/tv2lsCAbczegzC%2BIx4&client_ts=1521690222&ckey=DIl58SLFxFNndSV1GFNnMQVYkx1PP5tKe1siZu/86PR1u/Wh1Ptd%2BWOZsHHWxysSfAOhNJpdVWsdVJNsfJ8Sxd8WKVvNfAS8aS8fAOzYARzPyPc3JvtnPHjTdKfESTdnuTW6ZPvk2pNDh4uFzotgdMEFkzQ5wZVXl2Pf1/Y6hLK0OnCNxBj3%2Bnb0v72gZ6b0td%2BWOZsHHWxysSo/0y9D2K42SaB8Y/%2BaD2K42SaB8Y/%2BahU%2BWOZsHcrxysooUeND
Fixed by #15939
Tested http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html and 1080P is still missing.
missing ckey, and ckey is constant string.
My Chrome DevTools shows ccode is 0502 and a github repo called "annie" told me ccode should be 0590. -- Up to 540P now. I tried 1080P AND HDR , they do not works. I have VIP and level has been 6. Cookie is correctly. Here is the link https://v.youku.com/v_show/id_XNDgwOTA4MjEyOA==.html I can provide a China Proxy via my own local network, if you need.
Hello all,
i'm also having the exact same error with version 2021.03.03 when trying to download any youku video :
ERROR: Youku server reported error -6004: 客户端无权播放,201;
it suddently appeared since monday 2021.03.08, it used to work perfectly fine before.
Anyone knows how to fix it ? Thanks a lot
C:\Users\lin>youtube-dl -F http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html?spm=a2hww.20027244.m_250379.5~1~3~A [youku] XMzIwMzg4NTkyOA: Retrieving cna info [youku] XMzIwMzg4NTkyOA: Downloading JSON metadata ERROR: Youku server reported error -6004: 客户端无权播放,201; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
C:\Users\lin>youtube-dl -U youtube-dl is up-to-date (2017.12.02)