Closed Jaqen00 closed 5 years ago
[root@valuable-frog-1 ~]# ykdl --debug https://www.iqiyi.com/v_19rrss15rw.html WARNING:downloader:failed to import ThreadPoolExecutor! WARNING:downloader:multithread download disabled! WARNING:downloader:please install concurrent.futures from https://github.com/agronholm/pythonfutures ! DEBUG:common:video_host> www.iqiyi.com DEBUG:common:short_name> iqiyi DEBUG:html:get_content> URL: https://www.iqiyi.com/v_19rrss15rw.html DEBUG:html:get_content> Charset: UTF-8 DEBUG:html:get_content> URL: https://cache.m.iqiyi.com/tmts/3889014800/ad0ae28cffcb85df3de269245812142f/?sc=f146cc80b7243861ce776d2da88b80ec&src=76f90cbd92f94a2e925d83e8ccd22cb7&t=1564395214323 DEBUG:html:get_content> Charset: UTF-8 DEBUG:爱奇艺 (Iqiyi):tmts_data: {u'timestamp': u'20190729181335', u'code': u'A00000', u'data': {u'exclusive': 0, u'croIds': [0], u'code': 2, u'vd': 2, u'ad': 1, u'vid': u'ad0ae28cffcb85df3de269245812142f', u'ugc': 0, u'ip': [u'10.191.20.122'], u'head': 0, u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/ad0ae28cffcb85df3de269245812142f/afbe8fd3d73448c9//20190729/95/54/0e09bf1131db1840c30529f452d9501f.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=326df7a4fadbb75f6137dde4cb5d2689&qypid=3889014800_04022000001000000000_2&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=f3480a5cf36a2beb2d24821cbda03f33&np_tag=nginx_part_tag', u'duration': 281, u'prv': u'', u'thdt': 1, u'pano': {u'type': 1, u'rType': 0}, u'adDuration': 0, u'vipTypes': [0], u'rp': 0, u'wmarkPos': 0, u'vidl': [{u'unencryptedDuration': 0, u'code': 2, u'vd': 1, u'vid': u'9472eb68265fa842263c6c7c39ca0387', u'drmType': 1, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/9472eb68265fa842263c6c7c39ca0387/afbe8fd3d73448c9//20190729/15/52/6eb11f53adf425610e06fffaccb38c81.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=e1a9bca632fcd1d6e2333df787f9cb06&qypid=3889014800_04022000001000000000_1&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=e64f9b1a2ab7c37b7b98e24b1c44dfdc&np_tag=nginx_part_tag', u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/9472eb68265fa842263c6c7c39ca0387/afbe8fd3d73448c9//20190729/15/52/6eb11f53adf425610e06fffaccb38c81.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=e1a9bca632fcd1d6e2333df787f9cb06&qypid=3889014800_04022000001000000000_1&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=e64f9b1a2ab7c37b7b98e24b1c44dfdc&np_tag=nginx_part_tag', u'ists': 1, u'mver': 1, u'screenSize': u'640x360', u'dr': -1, u'lgt': 0}, {u'unencryptedDuration': 0, u'code': 2, u'vd': 2, u'vid': u'ad0ae28cffcb85df3de269245812142f', u'drmType': 1, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/ad0ae28cffcb85df3de269245812142f/afbe8fd3d73448c9//20190729/95/54/0e09bf1131db1840c30529f452d9501f.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=326df7a4fadbb75f6137dde4cb5d2689&qypid=3889014800_04022000001000000000_2&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=f3480a5cf36a2beb2d24821cbda03f33&np_tag=nginx_part_tag', u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/ad0ae28cffcb85df3de269245812142f/afbe8fd3d73448c9//20190729/95/54/0e09bf1131db1840c30529f452d9501f.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=326df7a4fadbb75f6137dde4cb5d2689&qypid=3889014800_04022000001000000000_2&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=f3480a5cf36a2beb2d24821cbda03f33&np_tag=nginx_part_tag', u'ists': 1, u'mver': 1, u'screenSize': u'896x504', u'dr': -1, u'lgt': 0}, {u'unencryptedDuration': 0, u'code': 2, u'vd': 96, u'vid': u'8dbeeb90b3dafd3e36e17dab95157ec9', u'drmType': 1, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/8dbeeb90b3dafd3e36e17dab95157ec9/afbe8fd3d73448c9//20190729/ba/87/c49189e71e3eb6ae6941eb6bc781da7f.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=523c3cfbc461d265aa28ed5ee5e4c01b&qypid=3889014800_04022000001000000000_96&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=d886e0ea216339b4137a237e4b327ad2&np_tag=nginx_part_tag', u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/8dbeeb90b3dafd3e36e17dab95157ec9/afbe8fd3d73448c9//20190729/ba/87/c49189e71e3eb6ae6941eb6bc781da7f.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=523c3cfbc461d265aa28ed5ee5e4c01b&qypid=3889014800_04022000001000000000_96&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=d886e0ea216339b4137a237e4b327ad2&np_tag=nginx_part_tag', u'ists': 1, u'mver': 1, u'screenSize': u'384x216', u'dr': -1, u'lgt': 0}, {u'unencryptedDuration': 0, u'code': 2, u'vd': 4, u'vid': u'a5176e9a823400a72075b99a85f531f6', u'drmType': 1, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/a5176e9a823400a72075b99a85f531f6/afbe8fd3d73448c9//20190729/c9/07/06ba0b6bf2d4db72d9f0098c7e917853.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=c2dbea72545721faf566dda97f163ac9&qypid=3889014800_04022000001000000000_4&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=a23c0d31b129e7e69998efdfe37a12b4&np_tag=nginx_part_tag', u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/a5176e9a823400a72075b99a85f531f6/afbe8fd3d73448c9//20190729/c9/07/06ba0b6bf2d4db72d9f0098c7e917853.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=c2dbea72545721faf566dda97f163ac9&qypid=3889014800_04022000001000000000_4&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=a23c0d31b129e7e69998efdfe37a12b4&np_tag=nginx_part_tag', u'ists': 1, u'mver': 1, u'screenSize': u'1280x720', u'dr': -1, u'lgt': 0}, {u'unencryptedDuration': 0, u'code': 1, u'vd': 21, u'vid': u'0f0e9c12308d6a378da3790f3d9a1987', u'drmType': 1, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/0f0e9c12308d6a378da3790f3d9a1987/afbe8fd3d73448c9//20190729/f8/97/7d1595cea47be37368c7532dfb3e02d7.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=825cb6ebf89be92cc1f7a41f52a104ec&qypid=3889014800_04022000001000000000_21&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=1&ff=265ts&iswb=0&qd_s=otv&vf=c0e10825d64258870b49d5cf4305e9d9&np_tag=nginx_part_tag', u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/0f0e9c12308d6a378da3790f3d9a1987/afbe8fd3d73448c9//20190729/f8/97/7d1595cea47be37368c7532dfb3e02d7.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=825cb6ebf89be92cc1f7a41f52a104ec&qypid=3889014800_04022000001000000000_21&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=1&ff=265ts&iswb=0&qd_s=otv&vf=c0e10825d64258870b49d5cf4305e9d9&np_tag=nginx_part_tag', u'ists': 0, u'mver': 1, u'screenSize': u'896x504', u'dr': -1, u'fileFormat': u'H265', u'lgt': 0}, {u'unencryptedDuration': 0, u'code': 1, u'vd': 17, u'vid': u'53563edbcffb726fb0d53903af58ec0c', u'drmType': 1, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/53563edbcffb726fb0d53903af58ec0c/afbe8fd3d73448c9//20190729/87/2f/1d40f52315e8454c29a2baa8d8b538c7.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=4f699c79992e3fdc842a0266432b0972&qypid=3889014800_04022000001000000000_17&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=1&ff=265ts&iswb=0&qd_s=otv&vf=c957d0231ee6836db14b04c09987f36b&np_tag=nginx_part_tag', u'm3utx': u'https://cache.m.iqiyi.com/mus/text/3889014800/53563edbcffb726fb0d53903af58ec0c/afbe8fd3d73448c9//20190729/87/2f/1d40f52315e8454c29a2baa8d8b538c7.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=4f699c79992e3fdc842a0266432b0972&qypid=3889014800_04022000001000000000_17&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=1&ff=265ts&iswb=0&qd_s=otv&vf=c957d0231ee6836db14b04c09987f36b&np_tag=nginx_part_tag', u'ists': 0, u'mver': 1, u'screenSize': u'1280x720', u'dr': -1, u'fileFormat': u'H265', u'lgt': 0}], u'cacheTime': u'2019-07-29 18:13:35', u'tail': 0, u'etype': 1, u'previewType': u'', u'rTime': u'', u'lgh': [], u'hdcp': 0, u'ff': u'f4v', u'isProduced': 0, u'du': u'http://data.video.ptqy.gitv.tv/videos', u'dr': -1, u'ds': u'A00012', u'lgt': 0, u'tvid': 3889014800, u'tipType': u'', u'fsc': 1, u'acf': u'1:Russian (aac (LC)) (stereo ch) (iso639-2:rus), 44100Hz, 128012bps, dolby_flag:2, id 0x:1', u'cid': 22, u'm3u': u'https://cache.m.iqiyi.com/mus/3889014800/ad0ae28cffcb85df3de269245812142f/afbe8fd3d73448c9//20190729/95/54/0e09bf1131db1840c30529f452d9501f.m3u8?qd_originate=tmts_py&tvid=3889014800&bossStatus=0&qd_vip=0&px=&src=3_31_312&prv=&previewType=&previewTime=&from=&qd_time=1564395215600&qd_p=0&qd_asc=326df7a4fadbb75f6137dde4cb5d2689&qypid=3889014800_04022000001000000000_2&qd_k=f146cc80b7243861ce776d2da88b80ec&isdol=0&code=2&ff=f4v&iswb=0&qd_s=otv&vf=f3480a5cf36a2beb2d24821cbda03f33&np_tag=nginx_part_tag', u'audio': [{u'lid': 1, u'bit': {}, u'name': u'\u56fd\u8bed', u'ispre': 1}], u'um': 0, u'screenSize': u'896x504', u'isdol': False, u'aid': 3889014800, u'clientIp': u'unix:', u'bossStatus': 0}} site: 爱奇艺 (Iqiyi) title: 大金毛你是属兔子的么? artist: None streams:
Download: 大金毛你是属兔子的么?_TD part 0
Traceback (most recent call last):
File "/usr/bin/ykdl", line 9, in
这是在linux下的测试结果
这属于个例吧,我也不清楚具体原因是什么。
With Linux and Python 3, it works for me. IQIYI is sometimes a mess, In my tests it has only 50/50 chance to work with those HTTP errors out of nowhere. From 4000, only 2000 are successful
C:\Users\Yan>ykdl --debug https://www.iqiyi.com/v_19rrss15rw.html DEBUG:common:video_host> www.iqiyi.com DEBUG:common:short_name> iqiyi DEBUG:html:get_content> URL: https://www.iqiyi.com/v_19rrss15rw.html DEBUG:html:get_content> Charset: UTF-8 DEBUG:html:get_content> URL: http://cache.video.qiyi.com/vps?tvid=3889014800&vid=ad0ae28cffcb85df3de269245812142f&v=0&qypid=3889014800_12&src=01012001010000000000&t=1564394476787&k_tag=1&k_uid=h6aiibtgwnr406zwhz7mnyhxv503lmsg&rs=1&vf=0a0169135563aed23d204c9d01d13deb DEBUG:html:get_content> Charset: utf-8 DEBUG:html:get_content> URL: http://data.video.iqiyi.com/videos/v0/20190729/95/54/a3623c38fceac1ad06c973381598cb00.f4v?qd_tvid=3889014800&qd_vipres=0&qd_index=1&qd_aid=3889014800&qd_stert=0&qd_scc=4d701d15131d9a389b9a16f577fa90a9&qd_sc=1ccc9199582d126b5048fee8fe7f1620&qd_p=759a0e9a&qd_ip=759a0e9a&qd_k=0a0169135563aed23d204c9d01d13deb&qd_src=01012001010000000000&qd_vipdyn=0&qd_uid=0&qd_tm=1564394476141&qd_vip=0 DEBUG:html:get_content> Charset: utf-8 DEBUG:html:get_content> URL: http://data.video.iqiyi.com/videos/v0/20190729/15/52/650ab62bbeac789290a0173e323c3f8c.f4v?qd_tvid=3889014800&qd_vipres=0&qd_index=1&qd_aid=3889014800&qd_stert=0&qd_scc=fb56b69446d0d1a7f293443d4fa0e0f3&qd_sc=1ccc9199582d126b5048fee8fe7f1620&qd_p=759a0e9a&qd_ip=759a0e9a&qd_k=0a0169135563aed23d204c9d01d13deb&qd_src=01012001010000000000&qd_vipdyn=0&qd_uid=0&qd_tm=1564394476141&qd_vip=0 DEBUG:html:get_content> Charset: utf-8 DEBUG:html:get_content> URL: http://data.video.iqiyi.com/videos/v0/20190729/c9/07/531e657e68557b8bb7af39118e589e58.f4v?qd_tvid=3889014800&qd_vipres=0&qd_index=1&qd_aid=3889014800&qd_stert=0&qd_scc=a9d52907e7d91523af1bda0457db45e3&qd_sc=1ccc9199582d126b5048fee8fe7f1620&qd_p=759a0e9a&qd_ip=759a0e9a&qd_k=0a0169135563aed23d204c9d01d13deb&qd_src=01012001010000000000&qd_vipdyn=0&qd_uid=0&qd_tm=1564394476141&qd_vip=0 DEBUG:html:get_content> Charset: utf-8 site: 爱奇艺 (Iqiyi) title: 大金毛你是属兔子的么? artist: None streams:
download-with: ykdl --format=TD [URL]
Download: 大金毛你是属兔子的么?_TD Traceback (most recent call last): File "C:\Users\Yan\AppData\Local\Programs\Python\Python36\Scripts\ykdl-script.py", line 11, in
load_entry_point('ykdl==1.6.2', 'console_scripts', 'ykdl')()
File "c:\users\yan\appdata\local\programs\python\python36\lib\site-packages\cykdl__main.py", line 183, in main
handle_videoinfo(info)
File "c:\users\yan\appdata\local\programs\python\python36\lib\site-packages\cykdl__main__.py", line 127, in handle_videoinfo
download(urls, name, ext, live)
File "c:\users\yan\appdata\local\programs\python\python36\lib\site-packages\cykdl\main__.py", line 78, in download
if save_urls(urls, name, ext, jobs = args.jobs):
File "c:\users\yan\appdata\local\programs\python\python36\lib\site-packages\ykdl\util\download.py", line 82, in save_urls
save_url(urls[0], name, ext, status)
File "c:\users\yan\appdata\local\programs\python\python36\lib\site-packages\ykdl\util\download.py", line 47, in save_url
response = urlopen(req, None)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 564, in error
result = self._call_chain(args)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
result = func(args)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 570, in error
return self._call_chain(args)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
result = func(args)
File "c:\users\yan\appdata\local\programs\python\python36\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
谢谢作者的项目。 这几天下载iqiyi的视频总是出错,提示403,方便的帮忙看一下,自己找不出原因。 不同ip下也测试了,不是ip的问题。