Android抖音去水印小工具

前言

微信8.0.0更新以后,大伙玩得不亦乐乎,除了会动的表情,特效的炸弹、烟花等,还有一个亮点就是微信个人状态背景,既可以挂图片,更可以挂视频,给人一种万物皆可短视频的感觉。我也很爱这个功能,但是奈何鄙人才疏学浅,没法制作炫酷的短视频。只能使用去抖音水印工具获取视频积累素材,但是目前接触的去水印工具:

  • 小程序:没广告的不能用,能用的大堆广告
  • 网页:速度慢且操作不便捷。

想想自己是个程序员,得尊重下自己的职业,自己动手丰衣足食。

以下内容,仅供学习娱乐使用。

思路

1. “抖音”,复制链接

今年的《恭喜发财》,我唱给你听%全民恭喜发财  https://v.douyin.com/Jc7Gk7w/ 复zhi此链接,打开Dou音搜索,直接观看視頻!

2. 解析出视频地址

https://v.douyin.com/Jc7Gk7w/

3. jsoup模拟手机请求获取重定向后链接

注意带上User-Agent的请求头:Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Mobile Safari/537.36

https://www.iesdouyin.com/share/video/6921725900140612878/?region=CN&mid=6921726283215112974&u_code=66201706&titleType=title&did=70883212011&iid=897618492003052&utm_source=copy_link&utm_campaign=client_share&utm_medium=android&app=aweme

4. 截取出item_ids ,也就是video后的数字

6921725900140612878

5. 利用官方接口请求视频信息

https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6921725900140612878

6. 解析视频相关信息

带水印播放地址:https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0300f7d0000c07eh4m43pnr7fcck4t0&ratio=720p&line=0

不带水印播放地址:https://aweme.snssdk.com/aweme/v1/play/?video_id=v0300f7d0000c07eh4m43pnr7fcck4t0&ratio=720p&line=0

描述:今年的《恭喜发财》,我唱给你听#全民恭喜发财

封面:https://p1.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logomcc:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6:300:400.jpeg?from=2563711402_large

{
    "extra": {
        "now": 1612095762000,
        "logid": "20210131202242010198066202121629C6"
    },
    "status_code": 0,
    "item_list": [
        {
			……
            "desc": "今年的《恭喜发财》,我唱给你听#全民恭喜发财",
			……
            "video": {
                "play_addr": {
                    "uri": "v0300f7d0000c07eh4m43pnr7fcck4t0",
                    "url_list": [
                        "https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0300f7d0000c07eh4m43pnr7fcck4t0&ratio=720p&line=0"
                    ]
                },
                "height": 1920,
                "dynamic_cover": {
                    "uri": "tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f",
                    "url_list": [
                        "https://p3.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logom:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6.image?from=2563711402_large",
                        "https://p9.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logom:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6.image?from=2563711402_large",
                        "https://p11.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logom:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6.image?from=2563711402_large"
                    ]
                },
                "duration": 39898,
                "vid": "v0300f7d0000c07eh4m43pnr7fcck4t0",
                "cover": {
                    "uri": "tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f",
                    "url_list": [
                        "https://p1.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logomcc:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6:300:400.jpeg?from=2563711402_large",
                        "https://p6.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logomcc:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6:300:400.jpeg?from=2563711402_large",
                        "https://p3.douyinpic.com/img/tos-cn-i-0813/c59682ad9a604899bba89b79ff5a114f~tplv-dmt-logomcc:tos-cn-i-0813/24798afb455f499eb93a7d85621bb9b6:300:400.jpeg?from=2563711402_large"
                    ]
                },
                "width": 1080,
                "origin_cover": {
                    "uri": "tos-cn-p-0015/72fc04bbf5444f37b858cc693451fe29_1611589988",
                    "url_list": [
                        "https://p3.douyinpic.com/tos-cn-p-0015/72fc04bbf5444f37b858cc693451fe29_1611589988~tplv-dy-360p.jpeg?from=2563711402",
                        "https://p26.douyinpic.com/tos-cn-p-0015/72fc04bbf5444f37b858cc693451fe29_1611589988~tplv-dy-360p.jpeg?from=2563711402",
                        "https://p29.douyinpic.com/tos-cn-p-0015/72fc04bbf5444f37b858cc693451fe29_1611589988~tplv-dy-360p.jpeg?from=2563711402"
                    ]
                },
                "ratio": "720p",
                "has_watermark": true,
                "bit_rate": null
            },
            "aweme_type": 4,
            "comment_list": null,
            "promotions": null
        }
    ]
}

7. 模拟手机请求播放无水印视频

注意带上User-Agent的请求头:Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Mobile Safari/537.36

效果

抖音去水印

获取方式

号内回复【去水印】

onlyloveyd CSDN认证博客专家 Android Kotlin OpenCV
个人公众号【OpenCV or Android】,热爱Android、Kotlin、Flutter和OpenCV。毕业于华中科技大学计算机专业,曾就职于华为武汉研究所。目前在三线小城市生活,专注Android、OpenCV、Kotlin、Flutter等有趣的技术。
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 博客之星2020 设计师:CY__ 返回首页