好友
阅读权限25
听众
最后登录1970-1-1
|
三木猿
发表于 2020-9-8 10:35
本帖最后由 三木猿 于 2020-9-11 16:31 编辑
附加Java版的去抖音代码
java抖音去水印(原理请参考上一个帖子)
https://www.52pojie.cn/thread-1263147-1-1.html
(出处: 吾爱破解论坛)
1.从抖音上复制链接,大概长这样“https://v.douyin.com/JB9Fveb/ 复制此链接,打开【抖音短视频】,直接观看视频!”,这里我们只需要链接地址,在浏览器打开链接,然后按F12打开调试,再点Network,刷新下页面,我们再来看,这里有一条Get请求调用了后台并传递了item_ids=6558232015454342407,
2.然后我们发现这个id其实在就在现在的页面链接中,所以只需要截取这个url就能获得id
3.然后我们打开https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6558232015454342407,发现返回了一条json字符串
[Python] 纯文本查看 复制代码 // 20200908095807
// https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6558232015454342407
{
"ab_type": 1,
"extra": {
"now": 1599530291000,
"logid": "202009080958110101980590270803414C"
},
"status_code": 0,
"item_list": [
{
"desc": "",
"video_labels": null,
"is_live_replay": false,
"forward_id": "0",
"create_time": 1526957381,
"author": {
"platform_sync_info": null,
"policy_version": null,
"nickname": "王大锤丶",
"avatar_larger": {
"uri": "fa21000c9b3316043950",
"url_list": [
"https://p3-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p29-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p26-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038"
]
},
"avatar_thumb": {
"url_list": [
"https://p3-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p6-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p9-dy.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038"
],
"uri": "fa21000c9b3316043950"
},
"avatar_medium": {
"uri": "fa21000c9b3316043950",
"url_list": [
"https://p3-dy-ipv6.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p9-dy.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p29-dy.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038"
]
},
"unique_id": "ys288374851",
"type_label": null,
"uid": "91648641566",
"short_id": "288374851",
"signature": "我的皮,你无法想想",
"followers_detail": null,
"geofencing": null
},
"cha_list": null,
"video": {
"has_watermark": true,
"bit_rate": null,
"play_addr": {
"uri": "v0200f500000bc1oaeqkr6g02kqoredg",
"url_list": [
"https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f500000bc1oaeqkr6g02kqoredg&ratio=720p&line=0"
]
},
"cover": {
"uri": "86630006a8d2fba39389",
"url_list": [
"https://p6-dy-ipv6.byteimg.com/aweme/300x400/86630006a8d2fba39389.jpeg?from=2563711402_large",
"https://p26-dy.byteimg.com/aweme/300x400/86630006a8d2fba39389.jpeg?from=2563711402_large",
"https://p3-dy-ipv6.byteimg.com/aweme/300x400/86630006a8d2fba39389.jpeg?from=2563711402_large"
]
},
"height": 1024,
"width": 576,
"dynamic_cover": {
"uri": "866100107a055008ea0b",
"url_list": [
"https://p1-dy-ipv6.byteimg.com/obj/866100107a055008ea0b?from=2563711402_large",
"https://p26-dy.byteimg.com/obj/866100107a055008ea0b?from=2563711402_large",
"https://p3-dy-ipv6.byteimg.com/obj/866100107a055008ea0b?from=2563711402_large"
]
},
"ratio": "720p",
"duration": 15053,
"origin_cover": {
"uri": "866200085211de482240",
"url_list": [
"https://p3-dy-ipv6.byteimg.com/866200085211de482240~tplv-dy-360p.jpeg?from=2563711402",
"https://p9-dy.byteimg.com/866200085211de482240~tplv-dy-360p.jpeg?from=2563711402",
"https://p1-dy-ipv6.byteimg.com/866200085211de482240~tplv-dy-360p.jpeg?from=2563711402"
]
},
"vid": "v0200f500000bc1oaeqkr6g02kqoredg"
},
"text_extra": [
],
"duration": 15053,
"video_text": null,
"group_id": 6555430327911714000,
"aweme_id": "6558232015454342407",
"music": {
"position": null,
"status": 1,
"id": 6558232022232337000,
"mid": "6558232022232337165",
"author": "王大锤丶",
"cover_medium": {
"url_list": [
"https://p9-dy.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p3-dy-ipv6.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p6-dy-ipv6.byteimg.com/aweme/720x720/fa21000c9b3316043950.jpeg?from=4010531038"
],
"uri": "fa21000c9b3316043950"
},
"cover_thumb": {
"url_list": [
"https://p26-dy.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p3-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p6-dy-ipv6.byteimg.com/aweme/100x100/fa21000c9b3316043950.jpeg?from=4010531038"
],
"uri": "fa21000c9b3316043950"
},
"play_url": {
"uri": "http://p1-dy.byteimg.com/obj/8626000202c985cd3ca9",
"url_list": [
"http://p1-dy.byteimg.com/obj/8626000202c985cd3ca9",
"http://p9-dy.byteimg.com/obj/8626000202c985cd3ca9"
]
},
"title": "@王大锤丶创作的原声",
"cover_hd": {
"uri": "fa21000c9b3316043950",
"url_list": [
"https://p3-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p26-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p6-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038"
]
},
"cover_large": {
"url_list": [
"https://p3-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p26-dy.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038",
"https://p6-dy-ipv6.byteimg.com/aweme/1080x1080/fa21000c9b3316043950.jpeg?from=4010531038"
],
"uri": "fa21000c9b3316043950"
},
"duration": 15
},
"image_infos": null,
"risk_infos": {
"warn": false,
"type": 0,
"content": ""
},
"geofencing": null,
"label_top_text": null,
"long_video": null,
"statistics": {
"digg_count": 0,
"play_count": 0,
"aweme_id": "6558232015454342407",
"comment_count": 0
},
"aweme_type": 4,
"comment_list": null,
"is_preview": 0,
"share_url": "https://www.iesdouyin.com/share/video/6558232015454342407/?region=&mid=6558232022232337165&u_code=48&titleType=",
"share_info": {
"share_desc": "在抖音,记录美好生活",
"share_title": "@王大锤丶发了一个抖音短视频,你尽管点开,不好看算我输!",
"share_weibo_desc": "#在抖音,记录美好生活#@王大锤丶发了一个抖音短视频,你尽管点开,不好看算我输!"
},
"author_user_id": 91648641566,
"promotions": null
}
]
}
然后其中有这么一条数据,里面包含了一条url,记下这条URl,我们返回最开始的页面
[Asm] 纯文本查看 复制代码
"video": {
"has_watermark": true,
"bit_rate": null,
"play_addr": {
"uri": "v0200f500000bc1oaeqkr6g02kqoredg",
"url_list": [
"https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f500000bc1oaeqkr6g02kqoredg&ratio=720p&line=0"
]
},
4.点击播放,我们发现这么个玩意,是不是很眼熟对比之前记下的url,一模一样,所以我们知道这条url就是最终我们需要的可以下载视频的url
5.到这里有人要吐槽了,既然点击一下播放就能获取到url,为啥还比比一大堆。当然如果只是下载视频当然不需要,但是我们不是要用代码实现吗,用代码模拟鼠标点击可还行,那太麻烦啦
所以我们就绕一大圈最终获取到视频下载地址,这是只需要调用下这条链接就可以开始下载了。
|
免费评分
-
查看全部评分
|