自己研究了一下抖音规则写出来的接口
接口后面加上主页接口就会返回用户的头像,名字,和作品数
https://api.kakaa.net/api/batch/?url=https://v.douyin.com/duro7xA/
"code": 101,
"msg": "success",
"user_info": {
"nickname": "央视新闻",
"works_num": 5541,
"avatar": "https://www.zkewo.com/wp-content/uploads/2024/07/20240702094729-6683ccb16c3aa.jpeg?from=2956013662",
"uid": 66598046050
},
"max_cursor": 1632574593000
}
max_curosr 是请求作品列表的参数 每次都要加上
接着就是在第一次请求的接口是加上max_cursor参数获取作品列表 &max_cursor=1632574680000
https://api.kakaa.net/api/batch/?url=https://v.douyin.com/duro7xA/&max_cursor=1632574680000
{
"code": 101,
"msg": "success",
"videolist": [
{
"video_id": "https://www.iesdouyin.com/share/video/7005509862658542856",
"desc": "女朋友赖床怎么办 #中二病也要谈恋爱 #我在抖音看动漫 ",
"cover": "https://p6-sign.douyinpic.com/tos-cn-i-0813/b71e89f4e9624e899a8216e6c25a0eb1~c5_300x400.jpeg?x-expires=1633780800&x-signature=9kNcAPMrlEPLsamD0hJ4QUHpPy8%3D&from=4257465056_large",
"video": "http://v3-c.douyinvod.com/13bc050a7f105f7507c4ca5ca3f21683/614f24f5/video/tos/cn/tos-cn-ve-15/380b7411cfc0452c951f2f655637b2b8/?a=1128&br=486&bt=486&btag=3&cd=0%7C0%7C0&ch=96&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=SGGs5hhe6p9y4k_4kaPD1_dmEFg&l=202109252032120102100411670131ECD7&lr=all&mime_type=video_mp4&net=0&pl=0&qs=0&rc=anVteTg6Zm48NzMzNGkzM0ApNzZlZzQ3NzxoNzk4aGRoN2cpaHV2fWVuZDFwekBjNF9icjQwMHBgLS1kLWFzcy4vLV40MmFeNDIvLjU0YjM6Y29zYlxmK2BtYmJeYA%3D%3D&vl=&vr=",
"type": 1
},
{
"video_id": "https://www.iesdouyin.com/share/video/7002201015630040334",
"desc": "“不知不觉我爱上了他” #动漫推荐 #玉子的爱情故事",
"cover": "https://p3-sign.douyinpic.com/tos-cn-p-0015/b35faa4a7b3e4780b7d833ecf3c37c8b~c5_300x400.jpeg?x-expires=1633780800&x-signature=iYAhioKvVis5vtpc5ZsrDEmiBno%3D&from=4257465056_large",
"video": "http://v3-c.douyinvod.com/d07a4911b259729597a1a836f9b1e508/614f24f8/video/tos/cn/tos-cn-ve-15/faec2565b20742a2a9e51cf364e60a2a/?a=1128&br=684&bt=684&btag=3&cd=0%7C0%7C0&ch=96&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=SGGs5hhe6p9y4k_4kaPD1_dmEFg&l=202109252032120102100411670131ECD7&lr=all&mime_type=video_mp4&net=0&pl=0&qs=0&rc=amx2ZTM6ZjlnNzMzNGkzM0ApNjxnNzk2ZDs0NzdpOz**(屏蔽词请勿修改绕过,禁止发布,否则可能被删帖或禁言)GcpaHV2fWVuZDFwekBiNWVxcjRnLmpgLS1kLWFzczRjY2IxNi9eM19gNTBiYjM6Y29zYlxmK2BtYmJeYA%3D%3D&vl=&vr=",
"type": 1
},
],
"num": 20,
"max_cursor": 1622719724000,
"min_cursor": 1631104826000,
"has_more": 1
}
接口返回的是这页的作品列表,需要请求下一页就把接口的max_cursor参数替换成这次的max_cursor参数,has_more:1 就是还有下一页的意思(有时候不准)
video_id就是视频的分享链接,可以重新采用单独去水印接口重新解析一下
desc 就是视频标题
cover 视频封面
url 视频无水印链接
type=1为视频 2为图集
抖音和火山链接都可以