ihmily / DouyinLiveRecorder

可循环值守和多人录制的直播录制软件,支持抖音、TikTok、快手、虎牙、斗鱼、B站、小红书、pandatv、afreecatv、flextv、popkontv、twitcasting、winktv、百度、微博、酷狗、花椒、Twitch、Acfun、CHZZK等平台直播录制
MIT License
4.64k stars 549 forks source link

录制TK出现错误 错误信息: type: TypeError, unsupported operand type(s) for #701

Open luoyuLianga opened 1 day ago

luoyuLianga commented 1 day ago

⚠️ 确认是否已存在类似问题

🔧 运行方式

使用源代码运行

🐍 如果是使用源代码运行,请选择你的Python环境版本

Python 3.9

⚠️ 确认是否已经重试多次

🕹 复现步骤

  1. https://www.tiktok.com/@eyzxie/live
  2. ts

😯 问题描述

image

📜 错误信息

No response

luoyuLianga commented 1 day ago

更换直播间地址也还是有问题: 新地址: https://www.tiktok.com/@yanzkag_/live

ihmily commented 1 day ago

更换直播间地址也还是有问题: https://www.tiktok.com/@yanzkag_/live

除了TikTok其他直播能正常录制吗?

luoyuLianga commented 1 day ago

更换直播间地址也还是有问题: https://www.tiktok.com/@yanzkag_/live

除了TikTok其他直播能正常录制吗?

测试了抖音的,正常的

Issues-translate-bot commented 1 day ago

Bot detected the issue body's language is not English, translate it automatically.


There are still problems when changing the live broadcast room address: https://www.tiktok.com/@yanzkag_/live

Can live broadcasts other than TikTok be recorded normally?

I tested Douyin and it’s normal.

ihmily commented 1 day ago

大概是type hint代码的问题导致报错,python 3.10以下没有 list[dict[str, int | Any]] 使用 | 这样的写法

升级python版本 或者 将DouyinLiveRecorder/douyinliverecorder/stream.py的大概65行

def get_video_quality_url(stream, q_key) -> list[dict[str, int | Any]]:

改为

def get_video_quality_url(stream, q_key) -> list[dict[str, Union[int, Any]]]
luoyuLianga commented 1 day ago

大概是type hint代码的问题导致报错,python 3.10以下没有 list[dict[str, int | Any]] 使用 | 这样的写法

升级python版本 或者 将DouyinLiveRecorder/douyinliverecorder/stream.py的大概65行

def get_video_quality_url(stream, q_key) -> list[dict[str, int | Any]]:

改为

def get_video_quality_url(stream, q_key) -> list[dict[str, Union[int, Any]]]

def get_video_quality_url(stream, q_key) -> list[dict[str, int | Any]]:

改为

def get_video_quality_url(stream, q_key) -> list[dict[str, Union[int, Any]]]:

可以解决上述报错,但是录制中出现了一个新问题: image