This commit is contained in:
eric
2025-12-02 14:51:17 +08:00
parent 9609e4caa1
commit 511576aa97
2 changed files with 17 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
https://live.douyin.com/456576000931,主播: 介休〖烩饕〗大块牛肉饭「摆摊」
https://live.douyin.com/270513395244,主播: 小喻的摆摊日记
https://live.douyin.com/742474761291,主播: 阿诺椰子•
https://live.douyin.com/820845121901,主播: 地摊闺蜜_创意寿司_(马儿努力版)
https://live.douyin.com/980855021360,主播: 图爸摆摊卖枣糕(日照首家)教学员

21
main.py
View File

@@ -41,6 +41,7 @@ from ffmpeg_install import (
version = "v4.0.7"
platforms = ("\n国内站点:抖音|快手|虎牙|斗鱼|YY|B站|小红书|bigo|blued|网易CC|千度热播|猫耳FM|Look|TwitCasting|百度|微博|"
"酷狗|花椒|流星|Acfun|畅聊|映客|音播|知乎|嗨秀|VV星球|17Live|浪Live|漂漂|六间房|乐嗨|花猫|淘宝|京东|咪咕|连接|来秀"
@@ -1164,6 +1165,9 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
if port_info['is_live'] is False:
print(f"\r{record_name} 等待直播... ")
# 直接退出线程eric
return
if start_pushed:
if over_show_push:
push_content = "直播间状态更新:[直播间名称] 直播已结束!时间:[时间]"
@@ -1182,6 +1186,10 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
else:
content = f"\r{record_name} 正在直播中..."
print(content)
# 检查是否已有直播在录制
if len(recording) > 0 :
# 如果已有直播在录制,跳过这次录制(主播在线)
return # 或者 continue如果在循环中
if live_status_push and not start_pushed:
if begin_show_push:
@@ -1290,10 +1298,7 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
if proxy_address:
ffmpeg_command.insert(1, "-http_proxy")
ffmpeg_command.insert(2, proxy_address)
# 检查是否已有直播在录制
if len(recording) > 0:
# 如果已有直播在录制,跳过这次录制
return # 或者 continue如果在循环中
recording.add(record_name)
start_record_time = datetime.datetime.now()
recording_time_list[record_name] = [start_record_time, record_quality_zh]
@@ -1616,7 +1621,7 @@ def start_record(url_data: tuple, count_variable: int = -1) -> None:
else:
# ====================== 抖音→YouTube 2025重构单层重试 + 统一清理) ======================
# ====================== 抖音→YouTube 2025重构单层重试 + 统一清理) ======================
import queue, unicodedata, platform, traceback
class StreamEnded(Exception):
@@ -2427,9 +2432,15 @@ while True:
create_var[f'thread_{monitoring}'].start()
running_list.append(url_tuple[1])
time.sleep(local_delay_default)
url_tuples_list = []
first_start = False
except Exception as err:
logger.error(f"错误信息: {err} 发生错误的行数: {err.__traceback__.tb_lineno}")