当然它也可能是假4K,腾讯嘛,你懂的。
不过这个接口需要cookie,不一定要会员的(未验证)。
请求如下:
- 其中guid和timeforhj已省略,他们分别是数字字母32位,时间戳13位,guid不确定是不是随机的。
https://tv.aiseet.atianqi.com/i-tvbin/qtv_video/cover_details/cover_detail_waterfall?format=jce&pure_child_mode=false&position_vid=k0032m2d7bn&pip_support=no&req_scene=video_list&id=o0ytzgvq6o08e9o&id_type=2003&hv=1&Q-UA=QV%3D1%26PR%3DVIDEO%26PT%3DSNMAPP%26CHID%3D13052%26RL%3D1920*1080%26VN%3D4.6.0%26VN_CODE%3D6606%26SV%3D4.4.4%26SI%3D19%26DV%3Dorange%26VN_BUILD%3D1017%26MD%3DS2001A%26BD%3Dorange%26MF%3DMStar%2BSemiconductor%252C%2BInc.%26TVKPlatform%3D670603&guid=&licence=snm&timeforhj=
cookie:cookie string ...
Host: tv.aiseet.atianqi.com
Accept-Encoding: gzip
User-Agent: okhttp/${project.version}
话说MStar Semiconductor, Inc
这里什么鬼,搜了下叫晨星半导体股份有限公司
,和腾讯有啥关系吗。
- 最终可以精简如下,可能还能去掉一些参数,不过我不想弄了。请求其他的可有可无,但要判断是不是4K,必须带cookie
https://tv.aiseet.atianqi.com/i-tvbin/qtv_video/cover_details/cover_detail_waterfall?format=jce&req_scene=video_list&id=o0ytzgvq6o08e9o&Q-UA=QV%3D1%26PR%3DVIDEO%26PT%3DSNMAPP%26CHID%3D13052%26RL%3D3840*2160%26VN%3D4.6.0%26VN_CODE%3D6606%26SV%3D%26SI%3D%26DV%3D%26VN_BUILD%3D%26MD%3D%26BD%3D%26MF%3D%26TVKPlatform%3D670603
- Q-UA部分
QV%3D1%26PR%3DVIDEO%26PT%3DSNMAPP%26CHID%3D13052%26RL%3D3840*2160%26VN%3D4.6.0%26VN_CODE%3D6606%26SV%3D%26SI%3D%26DV%3D%26VN_BUILD%3D%26MD%3D%26BD%3D%26MF%3D%26TVKPlatform%3D670603
urldecode后,其中3840*2160
可以没有,其他部分似乎都是必须的
QV=1&PR=VIDEO&PT=SNMAPP&CHID=13052&RL=3840*2160&VN=4.6.0&VN_CODE=6606&SV=&SI=&DV=&VN_BUILD=&MD=&BD=&MF=&TVKPlatform=670603
urlencode代码(python)
from urllib.parse import quote
qua_d = "QV=1&PR=VIDEO&PT=SNMAPP&CHID=13052&RL=3840*2160&VN=4.6.0&VN_CODE=6606&SV=&SI=&DV=&VN_BUILD=&MD=&BD=&MF=&TVKPlatform=670603"
qua_e = quote(qua_d,safe='*')
# QV%3D1%26PR%3DVIDEO%26PT%3DSNMAPP%26CHID%3D13052%26RL%3D3840*2160%26VN%3D4.6.0%26VN_CODE%3D6606%26SV%3D%26SI%3D%26DV%3D%26VN_BUILD%3D%26MD%3D%26BD%3D%26MF%3D%26TVKPlatform%3D670603
正题
这个接口是看专辑的,并非单集,单集需要通过视频接口信息得到。
链接可直接在登录了腾讯视频的浏览器中访问,会得到一个文件。
返回数据中,如果有一个链接是http://vmat.gtimg.com/kt/common/video/imgtag/4k1514540045598.png
,那么该剧集有4K(不一定是真4K,也可能是1080 hevc)
返回示例