监控快手关注列表更新以及去视频水印视频

发布于:2025-03-14 ⋅ 阅读:(20) ⋅ 点赞:(0)
  def printData(self):

        if len(self.UpdateDataList) > 0:
            self.UpdateDataList = sorted(self.UpdateDataList, key=lambda x: x['minutes'])  # 先更新的在前
        sucess = 0
        for index, video in enumerate(self.UpdateDataList):
            minutes = video['minutes']
            if minutes > self.updateInterval and index >= 3:
                break

            if minutes > self.updateInterval and sucess>=3:
                continue
            index += 1
            author = video['author']
            name = author['name']  # 昵称

            photo = video['photo']
            id = photo['id']  # 标题带话题
            caption = photo['caption']  # 标题带话题
            # likeCount = photo['likeCount']
            realLikeCount = photo['realLikeCount']
            viewCount = photo['viewCount']
            coverUrl = photo['coverUrl']
            photoUrl = photo['photoUrl']

            link = f"https://www.kuaishou.com/short-video/{id}"

            print('\n' + str(index) * 60)

            str2 = ((((f"{str(index)} 昵称:{name},  已更新:{minutes}分钟, 点赞:{realLikeCount}, 播放:{viewCount} "
                       + "\n" + f"{str(index)} 标题:{caption} ")
                      + "\n" + f"{str(index)} 作品链接: {link}")
                     + "\n" + f"{str(index)} 封面: {coverUrl}")
                    + "\n" + f"{str(index)} 视频链接: {photoUrl}")
            print(str2)
            print(str(index) * 60 + "\n")

            if minutes > self.updateInterval:
                continue

            sucess += 1
            # webbrowser.open(link)
            tools.weChattTip(str2)

        print("成功:" + str(sucess))
        print("检测:" + str(len(self.UpdateDataList)))

以上为部分输出代码,源码为自动获取浏览器本地cookie并多线程监控关注列表更新以及获取无水印视频链接

后续持续更新其他平台,包括抖音,tiktok,哔哩哔哩,小红书等

源码下载 :https://pan.quark.cn/s/16ac46fba4f4