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] 1080P formats missing #14932

Open
ellicefix opened this issue Dec 8, 2017 · 33 comments
Open

[youku] 1080P formats missing #14932

ellicefix opened this issue Dec 8, 2017 · 33 comments
Labels

Comments

@ellicefix
Copy link

@ellicefix ellicefix commented Dec 8, 2017

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)

@joeky888
Copy link

@joeky888 joeky888 commented Dec 9, 2017

I am not familiar with youku but

  1. Is it just me, or the link redirects to youku 404 page?

  2. Have you tried you-get? you-get 對於中國網站的支持比較好些 https://github.com/soimort/you-get/wiki/中文说明

@eglinuxer
Copy link

@eglinuxer eglinuxer commented Dec 11, 2017

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.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 13, 2017

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.

@joeky888
Copy link

@joeky888 joeky888 commented Dec 13, 2017

Duplicate of #14815.

@eglinuxer
Copy link

@eglinuxer eglinuxer commented Dec 14, 2017

The latest version 2017-12-14 still have this question, expect to debug it

@ytdl-org ytdl-org locked and limited conversation to collaborators Dec 14, 2017
@CoXier CoXier mentioned this issue Dec 18, 2017
2 of 6 tasks complete
@ytdl-org ytdl-org unlocked this conversation Dec 18, 2017
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 18, 2017

Can anyone test ccode = 0512 for your favorite videos? Lots of URLs here block users outside Mainland China, so I can't test them.

@yan12125 yan12125 added the broken-IE label Dec 18, 2017
@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 18, 2017

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.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 19, 2017

@ellicefix are you using ccode 0512?

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 19, 2017

@yan12125
what is 'ccode 0512'?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 19, 2017

@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.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 19, 2017

@yan12125
Sorry,I don’t know how to build youtube-dl ,there are many errors when I try to build it.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 19, 2017

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.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 19, 2017

I have tried ccode 0508&0512,they can't work
py
0508
0512
ERROR

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 20, 2017

@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.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 20, 2017

@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.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 20, 2017

@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.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 20, 2017

@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)

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 20, 2017

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.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 21, 2017

@ellicefix: glad to see that you've got to it. Could you also try 0507? As reported in #14903 (comment), 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.

@ellicefix
Copy link
Author

@ellicefix ellicefix commented Dec 21, 2017

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.

ccode

@yan12125 yan12125 changed the title it doesn't work on YouKu [youku] 1080P formats missing (was: it doesn't work on YouKu) Dec 23, 2017
@yan12125 yan12125 added request and removed broken-IE labels Dec 23, 2017
@leeming87v5
Copy link

@leeming87v5 leeming87v5 commented Dec 26, 2017

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":""}}

@CoXier
Copy link
Contributor

@CoXier CoXier commented Dec 26, 2017

@leeming87v5

What's the log?

@leeming87v5
Copy link

@leeming87v5 leeming87v5 commented Dec 26, 2017

@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.

@CoXier
Copy link
Contributor

@CoXier CoXier commented Dec 26, 2017

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)
@leeming87v5
Copy link

@leeming87v5 leeming87v5 commented Dec 26, 2017

@CoXier
OK, then.
Thank you very much. you're right, this video is available in China only.
It seems i should download it manually.

@CoXier CoXier mentioned this issue Dec 27, 2017
4 of 8 tasks complete
@yan12125 yan12125 changed the title [youku] 1080P formats missing (was: it doesn't work on YouKu) [youku] broken Mar 20, 2018
@yan12125 yan12125 changed the title [youku] broken [youku] broken; -6004: 客户端无权播放,201 Mar 20, 2018
@yan12125 yan12125 added broken-IE and removed request labels Mar 20, 2018
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 20, 2018

Now none of 0507, 0508 and 0512 works.

@weituotian
Copy link

@weituotian weituotian commented Mar 21, 2018

@yan12125

0512 not work now!

image

@bagusflyer
Copy link

@bagusflyer bagusflyer commented Mar 21, 2018

Any solution?

@weituotian
Copy link

@weituotian weituotian commented Mar 22, 2018

@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
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 22, 2018

Fixed by #15939

Tested http://v.youku.com/v_show/id_XMzIwMzg4NTkyOA==.html and 1080P is still missing.

@yan12125 yan12125 changed the title [youku] broken; -6004: 客户端无权播放,201 [youku] 1080P formats missing Mar 22, 2018
@zhangn1985
Copy link

@zhangn1985 zhangn1985 commented Mar 22, 2018

missing ckey, and ckey is constant string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.