Coder Social home page Coder Social logo

爱奇艺,视频解析出错 about ykdl HOT 22 CLOSED

seahoh avatar seahoh commented on July 19, 2024
爱奇艺,视频解析出错

from ykdl.

Comments (22)

zhangn1985 avatar zhangn1985 commented on July 19, 2024

iqiyi修改了html5的算法,所以部分使用html5算法解析的视频失效了。

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

vmsreq= 'http://cache.m.iqiyi.com/jp/tmts/{}/{}/?uid=&cupid=qc_100001_100102&platForm=h5&qyid=ml69v09a2p7qkt20rt4a7xr4&agenttype=12&type=m3u8&rate=1&qdv=1&qdx=n&qds=0&__jsT=sijsc&t={}&src=02020031010000000000&vf={}&callback=tmtsCallback'.format(tvid, vid, '1477093995657', '7db2dbada11a2a6bd14cd577c62e76f6')

这个请求里面的vf算不出来。

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

vf的算法:
http://static.qiyi.com/js/html5/js/page/playMovie/c42f5e2c!app_movie.js

函数:

getTmtsVf: function (a, b, c) {
var d = window.cmd5xtmts ? window.cmd5xtmts()  : {
},
e = '02020031010000000000';
$.extend(c || {
}, d, {
src: e
});
var f = '/jp/tmts/' + a + '/' + b + '/?' + $.param(c) + '&callback=tmtsCallback';
return c.vf = window.cmd5x ? window.cmd5x(f)  : '',
c
},```

from ykdl.

junges521 avatar junges521 commented on July 19, 2024

爱奇艺的直播解析怎么破,谁知道啊

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

爱奇艺也有直播呀?

from ykdl.

iwakaka avatar iwakaka commented on July 19, 2024

厉害了 我的歌,破解爱奇艺,搜到你这来了

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

只能播放部分爱奇艺视频。

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

https://github.com/soimort/you-get/issues/1584#issuecomment-271087215

from ykdl.

denobisipsis avatar denobisipsis commented on July 19, 2024

vf is cmd5x of

'/vms?key=fvip&src=01010031010010000000&tvId=542711800&vid=498ea80a002b233de6e46745b68aaf60&vinfo=1&tm=506&qyid=&puid=&authKey=882e904467c71b4ada72a3326116e6a7&um=0&pf=b6c13e26323c537d&thdk=&thdt=&rs=1&k_tag=1&qdv=2'

results in

d537d221543854ffdfbfcf1d5d1ace70

Trying the sample video http://www.iqiyi.com/v_19rr9h0t5g.html with normal cache call (needed proxy)

http://cache.video.qiyi.com/vms?key=fvip&src=01010031010010000000&tvId=542711800&vid=498ea80a002b233de6e46745b68aaf60&vinfo=1&tm=506&qyid=&puid=&authKey=882e904467c71b4ada72a3326116e6a7&um=0&pf=b6c13e26323c537d&thdk=&thdt=&rs=1&k_tag=1&qdv=2&vf=d537d221543854ffdfbfcf1d5d1ace70

try it with https://github.com/denobisipsis/adownloader/blob/master/iqiyi_vf_ibt.php

from ykdl.

 avatar commented on July 19, 2024

请问楼上的方法能用吗,我看不懂怎么用23333

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

我也是看不懂。

from ykdl.

gooyie avatar gooyie commented on July 19, 2024

http://static.iqiyi.com/js/player_v1/pcweb.wonder.js 里的一个module里,eval执行一段解密后的字符串,这个解密后的字符串就是cmd5x的js。(c/c++写后用emscripten转成js的)

cmd5x使用方法:

白箱第1集	http://www.iqiyi.com/v_19rrn5fkjw.html

从浏览器开发工具抓的,vf是flash里的xcalc计算出来的:
http://cache.video.qiyi.com/vms?key=fvip&src=1702633101b340d8917a69cf8a4b8c7c&tvId=319095200&vid=7f3791481e31a308c43d2f129c584ded&vinfo=1&tm=2914&qyid=770dafb8792c04d211d071c7b847ba19&puid=&authKey=462d88235a4c21ffd6ac878806a7e660&um=0&pf=b6c13e26323c537d&thdk=&thdt=&rs=1&k_tag=1&qdv=2&vf=eb6ce7c7192ad9c1a4270505f1a730ef


把src替换成 01010031010010000000 ,用cmd5x计算出vf:
http://cache.video.qiyi.com/vms?key=fvip&src=01010031010010000000&tvId=319095200&vid=7f3791481e31a308c43d2f129c584ded&vinfo=1&tm=2914&qyid=770dafb8792c04d211d071c7b847ba19&puid=&authKey=462d88235a4c21ffd6ac878806a7e660&um=0&pf=b6c13e26323c537d&thdk=&thdt=&rs=1&k_tag=1&qdv=2&vf=e60e041d6f27fc5bc3b78f4ea4d339f8

iqiyi_vf_ibt.php是用 https://github.com/sstur/js2php 转成php的?

不知道能否用这个 https://github.com/PiotrDabkowski/Js2Py 把cmd5x js 转成python?

from ykdl.

denobisipsis avatar denobisipsis commented on July 19, 2024

@zhangn1985 @gooyie maybe you can try with this compiled

http://www.mediafire.com/file/7ri1b8arf87zyha/cm5xuacmd.exe

under windows. Run it with /vms string.

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

@denobisipsis @gooyie i will try

from ykdl.

gooyie avatar gooyie commented on July 19, 2024

@denobisipsis @zhangn1985
如果不能转成python,可以考虑下效仿爬虫用 https://github.com/doloopwhile/PyExecJS 执行js。

from ykdl.

mengmo avatar mengmo commented on July 19, 2024

@xyuanmu 可有兴趣看看?如有打扰,还请见谅。

from ykdl.

mengmo avatar mengmo commented on July 19, 2024

@zhangn1985
找到了一个能下载的
https://github.com/tuling56/Python/blob/master/Projects/down_video/iqiyi_video_download.py
基于 Python 2 写的,不知道能不能拿来参考

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

应该可以,看起来他的代码还蛮新的。

from ykdl.

Shadesss avatar Shadesss commented on July 19, 2024

This would be amazing!

from ykdl.

ssswang avatar ssswang commented on July 19, 2024

ykdl http://www.iqiyi.com/v_19rr6ywm1c.html --debug -i
DEBUG:common:video_host> www.iqiyi.com
DEBUG:common:short_name> iqiyi
DEBUG:html:get_content> URL: http://www.iqiyi.com/v_19rr6ywm1c.html
DEBUG:html:get_content> Charset: utf-8
DEBUG:html:get_content> URL: http://cache.video.qiyi.com/vps?tvid=693339900&vid=93ea0fe4d5b683fb667134e6f16ed9f6&v=0&qypid=693339900_12&src=01012001010000000000&t=1497574414730&k_tag=1&k_uid=bp4jru5xsvdeoobmaxtt2f1us5fc44uy&rs=1&vf=5bf7f4ddaffd9a19e6461c04af9daaf7
DEBUG:html:get_content> Charset: utf-8
DEBUG:html:get_content> URL: http://data.video.qiyi.com/videos/v0/20170614/02/c9/123768e895588b21a219b235ebf52703.f4v?qd_tvid=693339900&qd_vipres=2&qd_index=1&qd_aid=693339900&qd_stert=0&qd_scc=c4c53d23d69f855e82aa306337318afb&qd_sc=ae3f4aa48986d72dc8f6a7279fafa44b&qd_p=c4342605&qd_ip=c4342605&qd_k=5bf7f4ddaffd9a19e6461c04af9daaf7&qd_src=01012001010000000000&qd_vipdyn=2&qd_uid=0&qd_tm=1497574417236&qd_vip=0
Traceback (most recent call last):
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\Scripts\ykdl-script.py", line 11, in
load_entry_point('ykdl==1.4.11', 'console_scripts', 'ykdl')()
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\site-packages\ykdl-1.4.11-py3.6.egg\cykdl_main_.py", line 149, in main
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\site-packages\ykdl-1.4.11-py3.6.egg\ykdl\extractor.py", line 24, in parser
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\site-packages\ykdl-1.4.11-py3.6.egg\ykdl\extractors\iqiyi.py", line 83, in prepare
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\site-packages\ykdl-1.4.11-py3.6.egg\ykdl\util\html.py", line 65, in get_content
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Users\ssssssss\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 405: Not Allowed

from ykdl.

zhangn1985 avatar zhangn1985 commented on July 19, 2024

VIP 应该是不支持的。

from ykdl.

rosynirvana avatar rosynirvana commented on July 19, 2024

爱奇艺电影的接口应该有点不一样

from ykdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.