ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.19k stars 10.02k forks source link

[iQIYI] Fix VIP support #9839

Open morooi opened 8 years ago

morooi commented 8 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.19.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v <your command line>
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2016.06.19.1
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible. If work on your issue required an account credentials please provide them or explain how one can obtain them.

youtube-dl -v -F http://www.iqiyi.com/v_19rrkyywoo.html [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['-v', '-F', 'http://www.iqiyi.com/v_19rrkyywoo.html'] [debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936 [debug] youtube-dl version 2016.06.19.1 [debug] Python version 3.5.1 - Windows-10-10.0.10586-SP0 [debug] exe versions: ffmpeg 3.0 [debug] Proxy map: {} [iqiyi] temp_id: download video page [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Downloading JSON metadata [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Download path key of segment 1 for format h3 [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Download video info of segment 1 for format h3 [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Download path key of segment 1 for format h6 [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Download video info of segment 1 for format h6 [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Download path key of segment 1 for format h5 [iqiyi] 7f13d67408c4d737588e84d3c8b0985b: Download video info of segment 1 for format h5 [info] Available formats for 7f13d67408c4d737588e84d3c8b0985b: format code extension resolution note h6 f4v unknown 4.29MiB h5 f4v unknown 6.63MiB h3 f4v unknown 16.39MiB (best)

This URL is a 40-minute video,This result is wrong.Please fix this,thanks.

yan12125 commented 8 years ago

Partially fixed in 5b6ad86. Now youtube-dl can download the low-resolution version.

morooi commented 8 years ago

谢谢了~不过我主要还是需要VIP,1080p和4K的解析,能破解低清很不错了,大神们继续加油。Thanks.

yan12125 commented 8 years ago

VIP-only videos are on the plan. I'll try to download all resolutions for ordinary videos first.

By the way, please use English as much as possible so that others can understand the situation.

yan12125 commented 8 years ago

@M0ment Iqiyi is fixed in 2644e911bebcace4fbac7ddd3ea8c71936b1b3e9. I guess VIP videos work as usual. Could you try it?

morooi commented 8 years ago

@yan12125 I find that it can support more formats,but no 4K.And VIP videos are still not woking.

[youtube-dl] -v -F --cookies cookies.txt http://www.iqiyi.com/v_19rrldv28w.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-F', '--cookies', 'cookies.txt', 'http://www.iqiyi.com/v_19rrldv28w.html']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2016.07.03.1
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: none
[debug] Proxy map: {}
[iqiyi] temp_id: download video page
[iqiyi] e0f9e3b03039e1ab7113f1d27672f33b: Downloading JSON metadata
ERROR: Unable to load data. Error code: A00011; 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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpapfvv6m8\build\youtube_dl\YoutubeDL.py", line 676, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpapfvv6m8\build\youtube_dl\extractor\common.py", line 343, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpapfvv6m8\build\youtube_dl\extractor\iqiyi.py", line 360, in _real_extract
youtube_dl.utils.ExtractorError: Unable to load data. Error code: A00011; 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 commented 8 years ago

Could you try -u <username> -p <password>? If I remember it correctly --cookies does not work with Iqiyi.

morooi commented 8 years ago

Still not working.

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-u', 'PRIVATE', '-p', 'PRIVATE', '-F', 'http://www.iqiyi.com/v_19rrldv28w.html']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2016.07.03.1
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: none
[debug] Proxy map: {}
[iqiyi] Get token for logging
[iqiyi] Validate credentials
WARNING: unable to log in: please login via the web interface and enter the CAPTCHA code
[iqiyi] temp_id: download video page
[iqiyi] e0f9e3b03039e1ab7113f1d27672f33b: Downloading JSON metadata
ERROR: Unable to load data. Error code: A00011; 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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpapfvv6m8\build\youtube_dl\YoutubeDL.py", line 676, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpapfvv6m8\build\youtube_dl\extractor\common.py", line 343, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpapfvv6m8\build\youtube_dl\extractor\iqiyi.py", line 360, in _real_extract
youtube_dl.utils.ExtractorError: Unable to load data. Error code: A00011; 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 commented 8 years ago

WARNING: unable to log in: please login via the web interface and enter the CAPTCHA code

Maybe something has changed at Iqiyi. Have you tried to login via the web interface and enter the CAPTCHA code?

morooi commented 8 years ago

I have logged in iqiyi's website, and I can watch this video online. But the result is same.

yan12125 commented 8 years ago

Need a pair of valid username/password for further testing. If you trust me, you can drop me a mail with the username and the password.

IMPORTANT: If I remember it correctly Iqiyi doesn't like logging from multiple geographic locations. I'm in Taiwan and I'm not sure whether your account may be locked or not if I log in here.

morooi commented 8 years ago

@yan12125 I have sent my account to your email. Please check.

yan12125 commented 8 years ago

@M0ment Could you try this branch? https://github.com/yan12125/youtube-dl/tree/iqiyi-vcode

It will ask you the verification code. The code can be found in a image file captcha.gif

morooi commented 8 years ago

@yan12125 I have tried, I can get the verification code, but it's still a mistake.

youtube-dl -F -u 17854250895 -p zhang591006 http://www.iqiyi.com/v_19rrmbpcrc.html
[iqiyi] Get token for logging
[iqiyi] Validate credentials
[iqiyi] None: Downloading webpage
[iqiyi] Downloading CAPTCHA code
Type the code in image captcha.gif and press [Return]:
[iqiyi] Get token for logging
[iqiyi] Validate credentials
[iqiyi] temp_id: download video page
[iqiyi] d76967e1401c7053b713420b07c6a9c0: Downloading JSON metadata
ERROR: Unable to load data. Error code: A00011; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
yan12125 commented 8 years ago

@M0ment Do you have a VIP-only video that is available outside Mainland China? I can't find a working proxy for VIP-only videos.

morooi commented 8 years ago

@yan12125 I'm sorry, I can't find.

yan12125 commented 8 years ago

Never mind. Let's wait until someone finds a way for people outside Mainland China to watch VIP-only videos.

Kugel-Blitz commented 8 years ago

Hello. You can get a proxy here. Use OpenVPN to connect. https://vnet.one/?rc=2879

xiayyu commented 7 years ago

@yan12125 I have tested in mainland, login properly, but the url return is still non-vip addr and 6 min video is downloaded. In fact, when I switch web browser (chrome to firefox) with the same PC, later login would disable the former one. I am just wondering why mobile port is used for iqiyi for current version, what happed to the PC port?

yan12125 commented 7 years ago

what happed to the PC port

I can't reverse iqiyi's code from complicated SWF files. If you know how feel free to open an pull request.

xiayyu commented 7 years ago

@yan12125 take a look of this https://github.com/zhangn1985/ykdl/issues/19 there is no need to crack SWF, the key value of vf can be calculate by the function cmd5x and for vip-only video another key value ibt is also gen by cmd5x, which is easy to found in the js. function cmd5x is not trivial but someone already cracked it.

yan12125 commented 7 years ago

Looks good. But we can't use it directly without explicit permissions due to licensing restrictions. zhangn1985/ykdl is licensed under MIT and the original code https://github.com/tuling56/Python/blob/master/Projects/down_video/iqiyi_video_download.py has no license declarations.