Spaces:
Paused
Paused
update
Browse files- data/porter_tasks/porter_task_chenjing_douyin_live_record_to_youtube.json +0 -26
- data/porter_tasks/porter_task_chenjing_douyin_video_to_youtube.json +0 -47
- data/porter_tasks/porter_task_douyin_bless_bag_collect.json +0 -40
- data/porter_tasks/porter_task_songkewei_douyin_live_record_to_hf_netdisk.json +5 -5
- toolbox/porter/tasks/douyin_live_record_task.py +6 -28
data/porter_tasks/porter_task_chenjing_douyin_live_record_to_youtube.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"enable": true,
|
| 4 |
-
"type": "douyin_live_record",
|
| 5 |
-
"room_name": "大成说创业",
|
| 6 |
-
"room_id": "29576618707",
|
| 7 |
-
"sec_user_id": "MS4wLjABAAAAg0Oc_5SoYi4hrpc6xy-Yzuy1KrwV-zXw54JSqE4TW88",
|
| 8 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 9 |
-
"check_interval": 10,
|
| 10 |
-
"output_video_dir": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/",
|
| 11 |
-
"output_video_info_file": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/清华陈晶/file_info.json"
|
| 12 |
-
},
|
| 13 |
-
{
|
| 14 |
-
"enable": true,
|
| 15 |
-
"type": "video_to_youtube",
|
| 16 |
-
"video_group": "清华陈晶",
|
| 17 |
-
"target_channel_title": "清华陈晶",
|
| 18 |
-
"target_channel_id": "UCBR8-60-B28hp2BmDPdntcQ",
|
| 19 |
-
"key_of_credentials": "youtube_chenjing_credentials",
|
| 20 |
-
"check_interval": 300,
|
| 21 |
-
"video_info_file": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/清华陈晶/file_info.json",
|
| 22 |
-
"remove_after_upload": true,
|
| 23 |
-
"remove_after_upload_delay": 1,
|
| 24 |
-
"min_date2": "2025-09-06 00:00:00"
|
| 25 |
-
}
|
| 26 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/porter_tasks/porter_task_chenjing_douyin_video_to_youtube.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"enable": true,
|
| 4 |
-
"type": "douyin_video_download",
|
| 5 |
-
"user_name": "清华陈晶聊商业",
|
| 6 |
-
"sec_user_id": "MS4wLjABAAAAV5oVsV-RjxHKrcCuqQotWtHvT8_Y7z_aQnTvT61slic",
|
| 7 |
-
"check_interval": 900,
|
| 8 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 9 |
-
"min_date2": "2025-09-09 00:00:00",
|
| 10 |
-
"output_video_dir": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶",
|
| 11 |
-
"output_video_info_file": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶/file_info.json"
|
| 12 |
-
},
|
| 13 |
-
{
|
| 14 |
-
"enable": true,
|
| 15 |
-
"type": "douyin_video_download",
|
| 16 |
-
"user_name": "清华陈晶聊直播",
|
| 17 |
-
"sec_user_id": "MS4wLjABAAAARKzB1ApIHOuHlrl8Hqg_0RxIp-2Dz-AW3ipYfCCLr6wX5Y7ewfRce-QQ_19w7R34",
|
| 18 |
-
"check_interval": 900,
|
| 19 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 20 |
-
"min_date2": "2025-09-09 00:00:00",
|
| 21 |
-
"output_video_dir": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶",
|
| 22 |
-
"output_video_info_file": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶/file_info.json"
|
| 23 |
-
},
|
| 24 |
-
{
|
| 25 |
-
"enable": true,
|
| 26 |
-
"type": "douyin_video_download",
|
| 27 |
-
"user_name": "清华陈晶聊创业",
|
| 28 |
-
"sec_user_id": "MS4wLjABAAAAwRmjwKuBA0K6VSrBYevRHrG6-c7UFppdICgKqcYhVDWlza3_Xj8f4R8H252e8tiF",
|
| 29 |
-
"check_interval": 900,
|
| 30 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 31 |
-
"min_date2": "2025-09-09 00:00:00",
|
| 32 |
-
"output_video_dir": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶",
|
| 33 |
-
"output_video_info_file": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶/file_info.json"
|
| 34 |
-
},
|
| 35 |
-
{
|
| 36 |
-
"enable": true,
|
| 37 |
-
"type": "video_to_youtube",
|
| 38 |
-
"video_group": "清华陈晶",
|
| 39 |
-
"target_channel_title": "清华陈晶",
|
| 40 |
-
"target_channel_id": "UCBR8-60-B28hp2BmDPdntcQ",
|
| 41 |
-
"key_of_credentials": "youtube_chenjing_credentials",
|
| 42 |
-
"check_interval": 300,
|
| 43 |
-
"video_info_file": "data/tasks/chenjing_douyin_video_to_youtube/video/douyin/清华陈晶/file_info.json",
|
| 44 |
-
"remove_after_upload": true,
|
| 45 |
-
"min_date2": "2025-09-09 00:00:00"
|
| 46 |
-
}
|
| 47 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/porter_tasks/porter_task_douyin_bless_bag_collect.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"enable": true,
|
| 4 |
-
"type": "douyin_bless_bag_collect_task",
|
| 5 |
-
"time_period": [
|
| 6 |
-
{
|
| 7 |
-
"enable": true,
|
| 8 |
-
"date": "每天",
|
| 9 |
-
"time": [
|
| 10 |
-
{
|
| 11 |
-
"begin": "00:10",
|
| 12 |
-
"end": "23:59"
|
| 13 |
-
}
|
| 14 |
-
],
|
| 15 |
-
"random_break_duration_range": [0, 1],
|
| 16 |
-
"random_watch_duration_range": [900, 14400],
|
| 17 |
-
"bless_bag_join_rate": 1.0
|
| 18 |
-
},
|
| 19 |
-
{
|
| 20 |
-
"enable": false,
|
| 21 |
-
"date": "工作日",
|
| 22 |
-
"time": [
|
| 23 |
-
{
|
| 24 |
-
"begin": "09:30",
|
| 25 |
-
"end": "12:00"
|
| 26 |
-
},
|
| 27 |
-
{
|
| 28 |
-
"begin": "12:00",
|
| 29 |
-
"end": "18:00"
|
| 30 |
-
}
|
| 31 |
-
],
|
| 32 |
-
"random_break_duration_range": [0, 10],
|
| 33 |
-
"random_watch_duration_range": [900, 14400],
|
| 34 |
-
"bless_bag_join_rate": 1.0
|
| 35 |
-
}
|
| 36 |
-
],
|
| 37 |
-
"check_interval": 10,
|
| 38 |
-
"key_of_credentials": "douyin_wentao_credentials"
|
| 39 |
-
}
|
| 40 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/porter_tasks/porter_task_songkewei_douyin_live_record_to_hf_netdisk.json
CHANGED
|
@@ -7,16 +7,16 @@
|
|
| 7 |
"sec_user_id": "MS4wLjABAAAAs2XhHg7SMVu-STXWpod1zFxTzlnoeWzTXxAE02c7OQ49GMnGiHCcLxk8c3aDPr3s",
|
| 8 |
"key_of_credentials": "douyin_wentao_credentials",
|
| 9 |
"check_interval": 10,
|
| 10 |
-
"output_video_dir": "data/tasks/
|
| 11 |
-
"output_video_info_file": "data/tasks/
|
| 12 |
"extra_tags": ["宋可为"]
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"enable": true,
|
| 16 |
"type": "video_format_convert",
|
| 17 |
"task_name": "宋可为",
|
| 18 |
-
"video_info_file": "data/tasks/
|
| 19 |
-
"target_dir": "data/tasks/
|
| 20 |
"check_interval": 10,
|
| 21 |
"remove_after_upload": true,
|
| 22 |
"format_pairs": [["flv", "mp4"]]
|
|
@@ -25,7 +25,7 @@
|
|
| 25 |
"enable": true,
|
| 26 |
"type": "file_to_hf_netdisk",
|
| 27 |
"task_name": "宋可为",
|
| 28 |
-
"src_dir": "data/tasks/
|
| 29 |
"tgt_dir": "xianyu/customers/宋可为/{date_str}",
|
| 30 |
"repo_id": "tianxing1994/hf_netdisk",
|
| 31 |
"check_interval": 10,
|
|
|
|
| 7 |
"sec_user_id": "MS4wLjABAAAAs2XhHg7SMVu-STXWpod1zFxTzlnoeWzTXxAE02c7OQ49GMnGiHCcLxk8c3aDPr3s",
|
| 8 |
"key_of_credentials": "douyin_wentao_credentials",
|
| 9 |
"check_interval": 10,
|
| 10 |
+
"output_video_dir": "data/tasks/songkewei_douyin_live_record_to_hf_netdisk/live_record/宋可为",
|
| 11 |
+
"output_video_info_file": "data/tasks/songkewei_douyin_live_record_to_hf_netdisk/live_record/宋可为/file_info.json",
|
| 12 |
"extra_tags": ["宋可为"]
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"enable": true,
|
| 16 |
"type": "video_format_convert",
|
| 17 |
"task_name": "宋可为",
|
| 18 |
+
"video_info_file": "data/tasks/songkewei_douyin_live_record_to_hf_netdisk/live_record/宋可为/file_info.json",
|
| 19 |
+
"target_dir": "data/tasks/songkewei_douyin_live_record_to_hf_netdisk/live_record/宋可为/ready_to_hf_netdisk",
|
| 20 |
"check_interval": 10,
|
| 21 |
"remove_after_upload": true,
|
| 22 |
"format_pairs": [["flv", "mp4"]]
|
|
|
|
| 25 |
"enable": true,
|
| 26 |
"type": "file_to_hf_netdisk",
|
| 27 |
"task_name": "宋可为",
|
| 28 |
+
"src_dir": "data/tasks/songkewei_douyin_live_record_to_hf_netdisk/live_record/宋可为/ready_to_hf_netdisk",
|
| 29 |
"tgt_dir": "xianyu/customers/宋可为/{date_str}",
|
| 30 |
"repo_id": "tianxing1994/hf_netdisk",
|
| 31 |
"check_interval": 10,
|
toolbox/porter/tasks/douyin_live_record_task.py
CHANGED
|
@@ -273,34 +273,12 @@ class DouyinLiveRecordTask(BaseTask):
|
|
| 273 |
paid_live_data: dict = js.get("paid_live_data") or dict()
|
| 274 |
privilege_info_map: dict = paid_live_data.get("privilege_info_map") or dict()
|
| 275 |
if len(privilege_info_map) != 0:
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
return None
|
| 283 |
-
|
| 284 |
-
status: int = js["status"]
|
| 285 |
-
title: str = js["title"]
|
| 286 |
-
stream_data: dict = js["stream_data"]
|
| 287 |
-
metadata = copy.deepcopy(js)
|
| 288 |
-
metadata.pop("stream_data")
|
| 289 |
-
metadata["live_check_method"] = live_check_method
|
| 290 |
-
if status != 2:
|
| 291 |
-
logger.info(f"{self.flag} {live_check_method},未开播;")
|
| 292 |
-
return None
|
| 293 |
-
|
| 294 |
-
# 会员直播
|
| 295 |
-
# paid_live_data: dict = js.get("paid_live_data") or dict()
|
| 296 |
-
# privilege_info_map: dict = paid_live_data.get("privilege_info_map") or dict()
|
| 297 |
-
# if len(privilege_info_map) != 0:
|
| 298 |
-
# for _, v in privilege_info_map.items():
|
| 299 |
-
# paid_live_type = v.get("paid_live_type")
|
| 300 |
-
# ui_config = v.get("ui_config") or dict()
|
| 301 |
-
# paid_live_icon_title = ui_config.get("paid_live_icon_title")
|
| 302 |
-
# logger.info(f"{self.flag}跳过付费直播;live_check_method: {live_check_method}, paid_live_type: {paid_live_type}, paid_live_icon_title: {paid_live_icon_title}")
|
| 303 |
-
# return None
|
| 304 |
|
| 305 |
live_url = None
|
| 306 |
for quality_code in ("origin", "uhd", "hd", "sd", "md", "ld"):
|
|
|
|
| 273 |
paid_live_data: dict = js.get("paid_live_data") or dict()
|
| 274 |
privilege_info_map: dict = paid_live_data.get("privilege_info_map") or dict()
|
| 275 |
if len(privilege_info_map) != 0:
|
| 276 |
+
for _, v in privilege_info_map.items():
|
| 277 |
+
paid_live_type = v.get("paid_live_type")
|
| 278 |
+
ui_config = v.get("ui_config") or dict()
|
| 279 |
+
paid_live_icon_title = ui_config.get("paid_live_icon_title")
|
| 280 |
+
logger.info(f"{self.flag}跳过付费直播;live_check_method: {live_check_method}, paid_live_type: {paid_live_type}, paid_live_icon_title: {paid_live_icon_title}")
|
| 281 |
+
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
|
| 283 |
live_url = None
|
| 284 |
for quality_code in ("origin", "uhd", "hd", "sd", "md", "ld"):
|