新秀wiki

2022年-抖音最新去水印解析脚本,python

dy (1).png

朋友想要弄个接口,无聊抓包也下。只需要请求一个接口就好了

希望转载注明一下来源,就不弄回复可见了。

#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@author: chuxia
@contact: 676463@qq.com
@blog: https://qq.cool
@file: dy.py
@time: 2022/4/16 9:50 上午
'''
import requests


class Douyin:
    s = requests.Session()
    s.headers.update({
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
    })

    def __init__(self, url: str):
        self.url = url

    def run(self):
        res = self.s.get(self.url).url
        ids = res.split('video/')[1].split('?')[0]
        self.ids = ids
        self.getVideoInfo()

    def getVideoInfo(self):
        res = self.s.get('https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=' + self.ids).json()
        print(
            res['item_list'][0]['video']['play_addr']['url_list'][0].replace('playwm', 'play').replace('720p', '9999'))


url = 'https://v.douyin.com/NT4n1H8/ '
dy = Douyin(url)
dy.run()
-- 展开阅读全文 --
威联通 qnap 配置开机启动项,软件开机自启
« 上一篇 04-09
初夏网盘不限速下载
下一篇 » 05-15

发表评论

已有 5 条评论

  1. 慎独 VLv.0     Linux /    Google Chrome 说道:

    test

  2. 野狼 VLv.0     Linux /    Google Chrome 说道:

    dfsafsf

  3. 戒心 VLv.0     Linux /    Google Chrome 说道:

    不错 来一个吧

  4. 哎合 VLv.0     Linux /    Google Chrome 说道:

    yes

  5. ··· VLv.0     Linux /    Google Chrome 说道:

    good,研究一下