Spaces:
Running
Running
update
Browse files- .gitignore +1 -0
- data/porter_tasks/porter_task_chenjieshen_douyin_live_record_to_youtube.json +89 -0
- data/{porter_tasks_hugging.json → porter_tasks/porter_task_chenjieshen_douyin_live_to_bilibili_live.json} +8 -8
- data/porter_tasks/porter_task_chenjieshen_douyin_video_to_bilibili.json +36 -0
- data/porter_tasks/porter_task_chenjieshen_douyin_video_to_youtube.json +39 -0
- data/porter_tasks/porter_task_chenjing_douyin_video_to_youtube.json +47 -0
- data/porter_tasks/porter_task_lvxiaotong_douyin_live_record_to_youtube.json +23 -0
- data/porter_tasks/porter_task_lvxiaotong_douyin_video_to_youtube.json +58 -0
- data/porter_tasks/porter_task_xiaofeng_douyin_video_to_youtube.json +25 -0
- data/porter_tasks/porter_tasks_dev.json +9 -0
- data/porter_tasks_dev.json +0 -88
- data/porter_tasks_prd.json +0 -273
- data/{douyin_live_info_collect.json → tasks/douyin_live_info_collect.json} +0 -0
- main.py +22 -11
- toolbox/bilibili/live/live_manager.py +42 -41
- toolbox/porter/tasks/__init__.py +3 -1
- toolbox/porter/tasks/{douyin_live_to_bilibili_task.py → douyin_live_to_bilibili_live_task.py} +6 -12
- toolbox/porter/tasks/douyin_video_download_task.py +1 -1
- toolbox/porter/tasks/video_to_bilibili_task.py +3 -7
- toolbox/porter/tasks/video_to_youtube_task.py +1 -1
.gitignore
CHANGED
|
@@ -8,6 +8,7 @@
|
|
| 8 |
**/__pycache__/
|
| 9 |
|
| 10 |
#/data/
|
|
|
|
| 11 |
/docs/
|
| 12 |
/dotenv/
|
| 13 |
/hub_datasets/
|
|
|
|
| 8 |
**/__pycache__/
|
| 9 |
|
| 10 |
#/data/
|
| 11 |
+
/data/tasks
|
| 12 |
/docs/
|
| 13 |
/dotenv/
|
| 14 |
/hub_datasets/
|
data/porter_tasks/porter_task_chenjieshen_douyin_live_record_to_youtube.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": true,
|
| 4 |
+
"type": "douyin_live_record",
|
| 5 |
+
"room_name": "老陈的退路",
|
| 6 |
+
"room_id": "330025930592",
|
| 7 |
+
"check_interval": 10,
|
| 8 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 9 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"enable": true,
|
| 13 |
+
"type": "douyin_live_record",
|
| 14 |
+
"room_name": "老陈come_back",
|
| 15 |
+
"room_id": "78835697536",
|
| 16 |
+
"check_interval": 10,
|
| 17 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 18 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"enable": true,
|
| 22 |
+
"type": "douyin_live_record",
|
| 23 |
+
"room_name": "清源第一帅",
|
| 24 |
+
"room_id": "654177813521",
|
| 25 |
+
"check_interval": 10,
|
| 26 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 27 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"enable": true,
|
| 31 |
+
"type": "douyin_live_record",
|
| 32 |
+
"room_name": "清源人工智能研究院",
|
| 33 |
+
"room_id": "81728900292",
|
| 34 |
+
"check_interval": 10,
|
| 35 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 36 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"enable": true,
|
| 40 |
+
"type": "douyin_live_record",
|
| 41 |
+
"room_name": "小熊Bella与老爸",
|
| 42 |
+
"room_id": "139751520143",
|
| 43 |
+
"check_interval": 10,
|
| 44 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 45 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"enable": true,
|
| 49 |
+
"type": "douyin_live_record",
|
| 50 |
+
"room_name": "清源之虎",
|
| 51 |
+
"room_id": "998621457719",
|
| 52 |
+
"check_interval": 10,
|
| 53 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 54 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"enable": true,
|
| 58 |
+
"type": "douyin_live_record",
|
| 59 |
+
"room_name": "老陈真是好人",
|
| 60 |
+
"room_id": "599130203190",
|
| 61 |
+
"check_interval": 10,
|
| 62 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 63 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"enable": true,
|
| 67 |
+
"type": "douyin_live_record",
|
| 68 |
+
"room_name": "老陈小帮手",
|
| 69 |
+
"room_id": "738682070097",
|
| 70 |
+
"check_interval": 10,
|
| 71 |
+
"output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
|
| 72 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"enable": true,
|
| 76 |
+
"type": "video_to_youtube",
|
| 77 |
+
"video_group": "陈杰森",
|
| 78 |
+
"target_channel_title": "陈杰森",
|
| 79 |
+
"target_channel_id": "UCTO6vl29op6UGoFuEc-U_zg",
|
| 80 |
+
"key_of_credentials": "youtube_chenjiesen_credentials",
|
| 81 |
+
"check_interval": 300,
|
| 82 |
+
"video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json",
|
| 83 |
+
"remove_after_upload": false,
|
| 84 |
+
"remove_after_upload_delay": 1,
|
| 85 |
+
"playlist_title": "杰森直播",
|
| 86 |
+
"playlist_id": "PL1KtQ49rVMEkTkoaAfHJ9KvCeZ6HoPoc9",
|
| 87 |
+
"min_date2": "2025-09-06 00:00:00"
|
| 88 |
+
}
|
| 89 |
+
]
|
data/{porter_tasks_hugging.json → porter_tasks/porter_task_chenjieshen_douyin_live_to_bilibili_live.json}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
"enable": true,
|
| 4 |
-
"type": "
|
| 5 |
"room_name": "老陈的退路",
|
| 6 |
"room_id": "330025930592",
|
| 7 |
"check_interval": 10,
|
|
@@ -9,7 +9,7 @@
|
|
| 9 |
},
|
| 10 |
{
|
| 11 |
"enable": true,
|
| 12 |
-
"type": "
|
| 13 |
"room_name": "老陈come_back",
|
| 14 |
"room_id": "78835697536",
|
| 15 |
"check_interval": 10,
|
|
@@ -17,7 +17,7 @@
|
|
| 17 |
},
|
| 18 |
{
|
| 19 |
"enable": true,
|
| 20 |
-
"type": "
|
| 21 |
"room_name": "清源第一帅",
|
| 22 |
"room_id": "654177813521",
|
| 23 |
"check_interval": 10,
|
|
@@ -25,7 +25,7 @@
|
|
| 25 |
},
|
| 26 |
{
|
| 27 |
"enable": true,
|
| 28 |
-
"type": "
|
| 29 |
"room_name": "清源人工智能研究院",
|
| 30 |
"room_id": "81728900292",
|
| 31 |
"check_interval": 10,
|
|
@@ -33,7 +33,7 @@
|
|
| 33 |
},
|
| 34 |
{
|
| 35 |
"enable": true,
|
| 36 |
-
"type": "
|
| 37 |
"room_name": "小熊Bella与老爸",
|
| 38 |
"room_id": "139751520143",
|
| 39 |
"check_interval": 10,
|
|
@@ -41,7 +41,7 @@
|
|
| 41 |
},
|
| 42 |
{
|
| 43 |
"enable": true,
|
| 44 |
-
"type": "
|
| 45 |
"room_name": "清源之虎",
|
| 46 |
"room_id": "998621457719",
|
| 47 |
"check_interval": 10,
|
|
@@ -49,7 +49,7 @@
|
|
| 49 |
},
|
| 50 |
{
|
| 51 |
"enable": true,
|
| 52 |
-
"type": "
|
| 53 |
"room_name": "老陈真是好人",
|
| 54 |
"room_id": "599130203190",
|
| 55 |
"check_interval": 10,
|
|
@@ -57,7 +57,7 @@
|
|
| 57 |
},
|
| 58 |
{
|
| 59 |
"enable": true,
|
| 60 |
-
"type": "
|
| 61 |
"room_name": "老陈小帮手",
|
| 62 |
"room_id": "738682070097",
|
| 63 |
"check_interval": 10,
|
|
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
"enable": true,
|
| 4 |
+
"type": "douyin_live_to_bilibili_live",
|
| 5 |
"room_name": "老陈的退路",
|
| 6 |
"room_id": "330025930592",
|
| 7 |
"check_interval": 10,
|
|
|
|
| 9 |
},
|
| 10 |
{
|
| 11 |
"enable": true,
|
| 12 |
+
"type": "douyin_live_to_bilibili_live",
|
| 13 |
"room_name": "老陈come_back",
|
| 14 |
"room_id": "78835697536",
|
| 15 |
"check_interval": 10,
|
|
|
|
| 17 |
},
|
| 18 |
{
|
| 19 |
"enable": true,
|
| 20 |
+
"type": "douyin_live_to_bilibili_live",
|
| 21 |
"room_name": "清源第一帅",
|
| 22 |
"room_id": "654177813521",
|
| 23 |
"check_interval": 10,
|
|
|
|
| 25 |
},
|
| 26 |
{
|
| 27 |
"enable": true,
|
| 28 |
+
"type": "douyin_live_to_bilibili_live",
|
| 29 |
"room_name": "清源人工智能研究院",
|
| 30 |
"room_id": "81728900292",
|
| 31 |
"check_interval": 10,
|
|
|
|
| 33 |
},
|
| 34 |
{
|
| 35 |
"enable": true,
|
| 36 |
+
"type": "douyin_live_to_bilibili_live",
|
| 37 |
"room_name": "小熊Bella与老爸",
|
| 38 |
"room_id": "139751520143",
|
| 39 |
"check_interval": 10,
|
|
|
|
| 41 |
},
|
| 42 |
{
|
| 43 |
"enable": true,
|
| 44 |
+
"type": "douyin_live_to_bilibili_live",
|
| 45 |
"room_name": "清源之虎",
|
| 46 |
"room_id": "998621457719",
|
| 47 |
"check_interval": 10,
|
|
|
|
| 49 |
},
|
| 50 |
{
|
| 51 |
"enable": true,
|
| 52 |
+
"type": "douyin_live_to_bilibili_live",
|
| 53 |
"room_name": "老陈真是好人",
|
| 54 |
"room_id": "599130203190",
|
| 55 |
"check_interval": 10,
|
|
|
|
| 57 |
},
|
| 58 |
{
|
| 59 |
"enable": true,
|
| 60 |
+
"type": "douyin_live_to_bilibili_live",
|
| 61 |
"room_name": "老陈小帮手",
|
| 62 |
"room_id": "738682070097",
|
| 63 |
"check_interval": 10,
|
data/porter_tasks/porter_task_chenjieshen_douyin_video_to_bilibili.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": true,
|
| 4 |
+
"type": "douyin_video_download",
|
| 5 |
+
"user_name": "陈杰森资本NewBoombap",
|
| 6 |
+
"sec_user_id": "MS4wLjABAAAATGoBrO7yiJ3q9go4fxq9JXjrnP1bFpdkgKckC1IpfXA_vrjSmL9ZtjmTju8ApwbT",
|
| 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/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森",
|
| 11 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森/file_info.json"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"enable": true,
|
| 15 |
+
"type": "douyin_video_download",
|
| 16 |
+
"user_name": "小熊Bella与老爸",
|
| 17 |
+
"sec_user_id": "MS4wLjABAAAA49QFP6YhorLIIX9M-FiZeKxmqhqXlttluSsZeaxvxzU",
|
| 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/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森",
|
| 22 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森/file_info.json"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"enable": true,
|
| 26 |
+
"type": "video_to_bilibili",
|
| 27 |
+
"video_group": "陈杰森",
|
| 28 |
+
"check_interval": 300,
|
| 29 |
+
"video_info_file": "data/tasks/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森/file_info.json",
|
| 30 |
+
"target_user_name": "陈杰森",
|
| 31 |
+
"target_user_id": "442286660",
|
| 32 |
+
"key_of_credentials": "bilibili_chenjiesen_credentials",
|
| 33 |
+
"remove_after_upload": true,
|
| 34 |
+
"min_date2": "2025-09-09 00:00:00"
|
| 35 |
+
}
|
| 36 |
+
]
|
data/porter_tasks/porter_task_chenjieshen_douyin_video_to_youtube.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": true,
|
| 4 |
+
"type": "douyin_video_download",
|
| 5 |
+
"user_name": "陈杰森资本NewBoombap",
|
| 6 |
+
"sec_user_id": "MS4wLjABAAAATGoBrO7yiJ3q9go4fxq9JXjrnP1bFpdkgKckC1IpfXA_vrjSmL9ZtjmTju8ApwbT",
|
| 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/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森",
|
| 11 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森/file_info.json"
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"enable": true,
|
| 15 |
+
"type": "douyin_video_download",
|
| 16 |
+
"user_name": "小熊Bella与老爸",
|
| 17 |
+
"sec_user_id": "MS4wLjABAAAA49QFP6YhorLIIX9M-FiZeKxmqhqXlttluSsZeaxvxzU",
|
| 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/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森",
|
| 22 |
+
"output_video_info_file": "data/tasks/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森/file_info.json"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"enable": true,
|
| 26 |
+
"type": "video_to_youtube",
|
| 27 |
+
"video_group": "陈杰森",
|
| 28 |
+
"target_channel_title": "陈杰森",
|
| 29 |
+
"target_channel_id": "UCTO6vl29op6UGoFuEc-U_zg",
|
| 30 |
+
"key_of_credentials": "youtube_chenjiesen_credentials",
|
| 31 |
+
"check_interval": 300,
|
| 32 |
+
"video_info_file": "data/tasks/chenjieshen_douyin_video_to_bilibili/video/douyin/陈杰森/file_info.json",
|
| 33 |
+
"remove_after_upload": true,
|
| 34 |
+
"remove_after_upload_delay": 1,
|
| 35 |
+
"playlist_title": "Short",
|
| 36 |
+
"playlist_id": "PL1KtQ49rVMElugHudIdyKLAmgmMVdqoxQ",
|
| 37 |
+
"min_date2": "2025-09-06 00:00:00"
|
| 38 |
+
}
|
| 39 |
+
]
|
data/porter_tasks/porter_task_chenjing_douyin_video_to_youtube.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_lvxiaotong_douyin_live_record_to_youtube.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": true,
|
| 4 |
+
"type": "douyin_live_record",
|
| 5 |
+
"room_name": "吕晓彤",
|
| 6 |
+
"room_id": "25132757833",
|
| 7 |
+
"check_interval": 10,
|
| 8 |
+
"output_video_dir": "data/tasks/lvxiaotong_douyin_live_record_to_youtube/live_record/吕晓彤",
|
| 9 |
+
"output_video_info_file": "data/tasks/lvxiaotong_douyin_live_record_to_youtube/live_record/吕晓彤/file_info.json"
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"enable": true,
|
| 13 |
+
"type": "video_to_youtube",
|
| 14 |
+
"video_group": "吕晓彤",
|
| 15 |
+
"target_channel_title": "吕晓彤",
|
| 16 |
+
"target_channel_id": "UClD84JeJ_b1kZTHmJvPCwZQ",
|
| 17 |
+
"key_of_credentials": "youtube_lvxiaotong_credentials",
|
| 18 |
+
"check_interval": 300,
|
| 19 |
+
"video_info_file": "data/tasks/lvxiaotong_douyin_live_record_to_youtube/live_record/吕晓彤/file_info.json",
|
| 20 |
+
"remove_after_upload": true,
|
| 21 |
+
"min_date2": "2025-09-09 00:00:00"
|
| 22 |
+
}
|
| 23 |
+
]
|
data/porter_tasks/porter_task_lvxiaotong_douyin_video_to_youtube.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": true,
|
| 4 |
+
"type": "douyin_video_download",
|
| 5 |
+
"user_name": "吕晓彤",
|
| 6 |
+
"sec_user_id": "MS4wLjABAAAAqejZxZKopDBDEzxcQp-_1b019FfM05C0NzjQNpc5ylU",
|
| 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/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤",
|
| 11 |
+
"output_video_info_file": "data/tasks/lvxiaotong_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": "MS4wLjABAAAAenYfLf-t_uRZhgQmEFOLN1iY3l2FTo4ToyC6wGEQVAH3i763q4-QgtUEleMB8n-m",
|
| 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/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤",
|
| 22 |
+
"output_video_info_file": "data/tasks/lvxiaotong_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": "MS4wLjABAAAAkwn_ZhJXBB5f4qNT4mn_uk5hOmaCFS503C3tSHiSzSQADUpFTPuPHx4ZVScKQ1Yl",
|
| 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/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤",
|
| 33 |
+
"output_video_info_file": "data/tasks/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤/file_info.json"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"enable": true,
|
| 37 |
+
"type": "douyin_video_download",
|
| 38 |
+
"user_name": "吕晓彤的诗与远方",
|
| 39 |
+
"sec_user_id": "MS4wLjABAAAAnDI9XdGvKm9azWhg0qOviLt9xKTVT0E2fu7xOMDiMq_KJp2TdYPXvuhG8leGj-p6",
|
| 40 |
+
"check_interval": 900,
|
| 41 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 42 |
+
"min_date2": "2025-09-09 00:00:00",
|
| 43 |
+
"output_video_dir": "data/tasks/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤",
|
| 44 |
+
"output_video_info_file": "data/tasks/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤/file_info.json"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"enable": true,
|
| 48 |
+
"type": "video_to_youtube",
|
| 49 |
+
"video_group": "吕晓彤",
|
| 50 |
+
"target_channel_title": "吕晓彤",
|
| 51 |
+
"target_channel_id": "UClD84JeJ_b1kZTHmJvPCwZQ",
|
| 52 |
+
"key_of_credentials": "youtube_lvxiaotong_credentials",
|
| 53 |
+
"check_interval": 300,
|
| 54 |
+
"video_info_file": "data/tasks/lvxiaotong_douyin_video_to_youtube/video/douyin/吕晓彤/file_info.json",
|
| 55 |
+
"remove_after_upload": true,
|
| 56 |
+
"min_date2": "2025-09-09 00:00:00"
|
| 57 |
+
}
|
| 58 |
+
]
|
data/porter_tasks/porter_task_xiaofeng_douyin_video_to_youtube.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": true,
|
| 4 |
+
"type": "douyin_video_download",
|
| 5 |
+
"user_name": "肖峰说新能源",
|
| 6 |
+
"sec_user_id": "MS4wLjABAAAAQinRMLyQNYA45OYXoCDrwszhRGaDVirRE1fTNSaGGkc",
|
| 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/xiaofeng_douyin_video_to_youtube/video/douyin/肖峰说新能源",
|
| 11 |
+
"output_video_info_file": "data/tasks/xiaofeng_douyin_video_to_youtube/video/douyin/肖峰说新能源/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_xiaofeng_credentials",
|
| 20 |
+
"check_interval": 300,
|
| 21 |
+
"video_info_file": "data/tasks/xiaofeng_douyin_video_to_youtube/video/douyin/肖峰说新能源/file_info.json",
|
| 22 |
+
"remove_after_upload": true,
|
| 23 |
+
"min_date2": "2025-09-09 00:00:00"
|
| 24 |
+
}
|
| 25 |
+
]
|
data/porter_tasks/porter_tasks_dev.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"enable": false,
|
| 4 |
+
"type": "douyin_live_info_collect",
|
| 5 |
+
"check_interval": 10,
|
| 6 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 7 |
+
"output_file": "data/tasks/douyin_live_info_collect.json"
|
| 8 |
+
}
|
| 9 |
+
]
|
data/porter_tasks_dev.json
DELETED
|
@@ -1,88 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"enable": true,
|
| 4 |
-
"type": "douyin_video_download",
|
| 5 |
-
"user_name": "陈杰森 资本NewBoombap",
|
| 6 |
-
"sec_user_id": "MS4wLjABAAAATGoBrO7yiJ3q9go4fxq9JXjrnP1bFpdkgKckC1IpfXA_vrjSmL9ZtjmTju8ApwbT",
|
| 7 |
-
"check_interval": 900,
|
| 8 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 9 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 10 |
-
"output_video_dir": "data/video/douyin/陈杰森",
|
| 11 |
-
"output_video_info_file": "data/video/douyin/陈杰森/file_info.json"
|
| 12 |
-
},
|
| 13 |
-
{
|
| 14 |
-
"enable": true,
|
| 15 |
-
"type": "douyin_video_download",
|
| 16 |
-
"user_name": "小熊Bella与老爸",
|
| 17 |
-
"sec_user_id": "MS4wLjABAAAA49QFP6YhorLIIX9M-FiZeKxmqhqXlttluSsZeaxvxzU",
|
| 18 |
-
"check_interval": 900,
|
| 19 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 20 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 21 |
-
"output_video_dir": "data/video/douyin/陈杰森",
|
| 22 |
-
"output_video_info_file": "data/video/douyin/陈杰森/file_info.json"
|
| 23 |
-
},
|
| 24 |
-
{
|
| 25 |
-
"enable": true,
|
| 26 |
-
"type": "douyin_live_to_bilibili",
|
| 27 |
-
"room_name": "老陈的退路",
|
| 28 |
-
"room_id": "330025930592",
|
| 29 |
-
"check_interval": 10,
|
| 30 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 31 |
-
},
|
| 32 |
-
{
|
| 33 |
-
"enable": true,
|
| 34 |
-
"type": "douyin_live_to_bilibili",
|
| 35 |
-
"room_name": "老陈come_back",
|
| 36 |
-
"room_id": "78835697536",
|
| 37 |
-
"check_interval": 10,
|
| 38 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 39 |
-
},
|
| 40 |
-
{
|
| 41 |
-
"enable": true,
|
| 42 |
-
"type": "douyin_live_to_bilibili",
|
| 43 |
-
"room_name": "清源第一帅",
|
| 44 |
-
"room_id": "654177813521",
|
| 45 |
-
"check_interval": 10,
|
| 46 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 47 |
-
},
|
| 48 |
-
{
|
| 49 |
-
"enable": true,
|
| 50 |
-
"type": "douyin_live_to_bilibili",
|
| 51 |
-
"room_name": "清源人工智能研究院",
|
| 52 |
-
"room_id": "81728900292",
|
| 53 |
-
"check_interval": 10,
|
| 54 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 55 |
-
},
|
| 56 |
-
{
|
| 57 |
-
"enable": true,
|
| 58 |
-
"type": "douyin_live_to_bilibili",
|
| 59 |
-
"room_name": "小熊Bella与老爸",
|
| 60 |
-
"room_id": "139751520143",
|
| 61 |
-
"check_interval": 10,
|
| 62 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 63 |
-
},
|
| 64 |
-
{
|
| 65 |
-
"enable": true,
|
| 66 |
-
"type": "douyin_live_to_bilibili",
|
| 67 |
-
"room_name": "清源之虎",
|
| 68 |
-
"room_id": "998621457719",
|
| 69 |
-
"check_interval": 10,
|
| 70 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 71 |
-
},
|
| 72 |
-
{
|
| 73 |
-
"enable": true,
|
| 74 |
-
"type": "douyin_live_to_bilibili",
|
| 75 |
-
"room_name": "老陈真是好人",
|
| 76 |
-
"room_id": "599130203190",
|
| 77 |
-
"check_interval": 10,
|
| 78 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 79 |
-
},
|
| 80 |
-
{
|
| 81 |
-
"enable": true,
|
| 82 |
-
"type": "douyin_live_to_bilibili",
|
| 83 |
-
"room_name": "老陈小帮手",
|
| 84 |
-
"room_id": "738682070097",
|
| 85 |
-
"check_interval": 10,
|
| 86 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 87 |
-
}
|
| 88 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/porter_tasks_prd.json
DELETED
|
@@ -1,273 +0,0 @@
|
|
| 1 |
-
[
|
| 2 |
-
{
|
| 3 |
-
"enable": false,
|
| 4 |
-
"type": "douyin_live_info_collect",
|
| 5 |
-
"check_interval": 10,
|
| 6 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 7 |
-
"output_file": "data/douyin_live_info_collect.json"
|
| 8 |
-
},
|
| 9 |
-
{
|
| 10 |
-
"enable": true,
|
| 11 |
-
"type": "douyin_video_download",
|
| 12 |
-
"user_name": "肖峰说新能源",
|
| 13 |
-
"sec_user_id": "MS4wLjABAAAAQinRMLyQNYA45OYXoCDrwszhRGaDVirRE1fTNSaGGkc",
|
| 14 |
-
"check_interval": 900,
|
| 15 |
-
"key_of_credentials": "douyin_wentao_credentials",
|
| 16 |
-
"min_date2": "2025-08-06 00:00:00",
|
| 17 |
-
"output_video_dir": "data/video/douyin/肖峰说新能源",
|
| 18 |
-
"output_video_info_file": "data/video/douyin/肖峰说新能源/file_info.json"
|
| 19 |
-
},
|
| 20 |
-
{
|
| 21 |
-
"enable": true,
|
| 22 |
-
"type": "douyin_video_download",
|
| 23 |
-
"user_name": "陈杰森 资本NewBoombap",
|
| 24 |
-
"sec_user_id": "MS4wLjABAAAATGoBrO7yiJ3q9go4fxq9JXjrnP1bFpdkgKckC1IpfXA_vrjSmL9ZtjmTju8ApwbT",
|
| 25 |
-
"check_interval": 900,
|
| 26 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 27 |
-
"output_video_dir": "data/video/douyin/陈杰森",
|
| 28 |
-
"output_video_info_file": "data/video/douyin/陈杰森/file_info.json"
|
| 29 |
-
},
|
| 30 |
-
{
|
| 31 |
-
"enable": true,
|
| 32 |
-
"type": "douyin_video_download",
|
| 33 |
-
"user_name": "小熊Bella与老爸",
|
| 34 |
-
"sec_user_id": "MS4wLjABAAAA49QFP6YhorLIIX9M-FiZeKxmqhqXlttluSsZeaxvxzU",
|
| 35 |
-
"check_interval": 900,
|
| 36 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 37 |
-
"output_video_dir": "data/video/douyin/陈杰森",
|
| 38 |
-
"output_video_info_file": "data/video/douyin/陈杰森/file_info.json"
|
| 39 |
-
},
|
| 40 |
-
{
|
| 41 |
-
"enable": true,
|
| 42 |
-
"type": "douyin_video_download",
|
| 43 |
-
"user_name": "清华陈晶聊商业",
|
| 44 |
-
"sec_user_id": "MS4wLjABAAAAV5oVsV-RjxHKrcCuqQotWtHvT8_Y7z_aQnTvT61slic",
|
| 45 |
-
"check_interval": 900,
|
| 46 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 47 |
-
"output_video_dir": "data/video/douyin/清华陈晶",
|
| 48 |
-
"output_video_info_file": "data/video/douyin/清华陈晶/file_info.json"
|
| 49 |
-
},
|
| 50 |
-
{
|
| 51 |
-
"enable": true,
|
| 52 |
-
"type": "douyin_video_download",
|
| 53 |
-
"user_name": "清华陈晶聊直播",
|
| 54 |
-
"sec_user_id": "MS4wLjABAAAARKzB1ApIHOuHlrl8Hqg_0RxIp-2Dz-AW3ipYfCCLr6wX5Y7ewfRce-QQ_19w7R34",
|
| 55 |
-
"check_interval": 900,
|
| 56 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 57 |
-
"output_video_dir": "data/video/douyin/清华陈晶",
|
| 58 |
-
"output_video_info_file": "data/video/douyin/清华陈晶/file_info.json"
|
| 59 |
-
},
|
| 60 |
-
{
|
| 61 |
-
"enable": true,
|
| 62 |
-
"type": "douyin_video_download",
|
| 63 |
-
"user_name": "清华陈晶聊创业",
|
| 64 |
-
"sec_user_id": "MS4wLjABAAAAwRmjwKuBA0K6VSrBYevRHrG6-c7UFppdICgKqcYhVDWlza3_Xj8f4R8H252e8tiF",
|
| 65 |
-
"check_interval": 900,
|
| 66 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 67 |
-
"output_video_dir": "data/video/douyin/清华陈晶",
|
| 68 |
-
"output_video_info_file": "data/video/douyin/清华陈晶/file_info.json"
|
| 69 |
-
},
|
| 70 |
-
{
|
| 71 |
-
"enable": true,
|
| 72 |
-
"type": "douyin_video_download",
|
| 73 |
-
"user_name": "吕晓彤",
|
| 74 |
-
"sec_user_id": "MS4wLjABAAAAqejZxZKopDBDEzxcQp-_1b019FfM05C0NzjQNpc5ylU",
|
| 75 |
-
"check_interval": 900,
|
| 76 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 77 |
-
"output_video_dir": "data/video/douyin/吕晓彤",
|
| 78 |
-
"output_video_info_file": "data/video/douyin/吕晓彤/file_info.json"
|
| 79 |
-
},
|
| 80 |
-
{
|
| 81 |
-
"enable": true,
|
| 82 |
-
"type": "douyin_video_download",
|
| 83 |
-
"user_name": "吕晓彤视野",
|
| 84 |
-
"sec_user_id": "MS4wLjABAAAAenYfLf-t_uRZhgQmEFOLN1iY3l2FTo4ToyC6wGEQVAH3i763q4-QgtUEleMB8n-m",
|
| 85 |
-
"check_interval": 900,
|
| 86 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 87 |
-
"output_video_dir": "data/video/douyin/吕晓彤",
|
| 88 |
-
"output_video_info_file": "data/video/douyin/吕晓彤/file_info.json"
|
| 89 |
-
},
|
| 90 |
-
{
|
| 91 |
-
"enable": true,
|
| 92 |
-
"type": "douyin_video_download",
|
| 93 |
-
"user_name": "吕晓彤说",
|
| 94 |
-
"sec_user_id": "MS4wLjABAAAAkwn_ZhJXBB5f4qNT4mn_uk5hOmaCFS503C3tSHiSzSQADUpFTPuPHx4ZVScKQ1Yl",
|
| 95 |
-
"check_interval": 900,
|
| 96 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 97 |
-
"output_video_dir": "data/video/douyin/吕晓彤",
|
| 98 |
-
"output_video_info_file": "data/video/douyin/吕晓彤/file_info.json"
|
| 99 |
-
},
|
| 100 |
-
{
|
| 101 |
-
"enable": true,
|
| 102 |
-
"type": "douyin_video_download",
|
| 103 |
-
"user_name": "吕晓彤的诗与远方",
|
| 104 |
-
"sec_user_id": "MS4wLjABAAAAnDI9XdGvKm9azWhg0qOviLt9xKTVT0E2fu7xOMDiMq_KJp2TdYPXvuhG8leGj-p6",
|
| 105 |
-
"check_interval": 900,
|
| 106 |
-
"min_date2": "2025-09-06 00:00:00",
|
| 107 |
-
"output_video_dir": "data/video/douyin/吕晓彤",
|
| 108 |
-
"output_video_info_file": "data/video/douyin/吕晓彤/file_info.json"
|
| 109 |
-
},
|
| 110 |
-
{
|
| 111 |
-
"enable": true,
|
| 112 |
-
"type": "douyin_live_record",
|
| 113 |
-
"room_name": "老陌",
|
| 114 |
-
"room_id": "770758107267",
|
| 115 |
-
"check_interval": 10,
|
| 116 |
-
"output_video_dir": "data/live_records/douyin/老陌Live",
|
| 117 |
-
"output_video_info_file": "data/live_records/douyin/老陌Live/file_info.json"
|
| 118 |
-
},
|
| 119 |
-
{
|
| 120 |
-
"enable": true,
|
| 121 |
-
"type": "douyin_live_record",
|
| 122 |
-
"room_name": "老陈的退路",
|
| 123 |
-
"room_id": "330025930592",
|
| 124 |
-
"check_interval": 10,
|
| 125 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 126 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 127 |
-
},
|
| 128 |
-
{
|
| 129 |
-
"enable": true,
|
| 130 |
-
"type": "douyin_live_record",
|
| 131 |
-
"room_name": "老陈come_back",
|
| 132 |
-
"room_id": "78835697536",
|
| 133 |
-
"check_interval": 10,
|
| 134 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 135 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 136 |
-
},
|
| 137 |
-
{
|
| 138 |
-
"enable": true,
|
| 139 |
-
"type": "douyin_live_record",
|
| 140 |
-
"room_name": "清源第一帅",
|
| 141 |
-
"room_id": "654177813521",
|
| 142 |
-
"check_interval": 10,
|
| 143 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 144 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 145 |
-
},
|
| 146 |
-
{
|
| 147 |
-
"enable": true,
|
| 148 |
-
"type": "douyin_live_record",
|
| 149 |
-
"room_name": "清源人工智能研究院",
|
| 150 |
-
"room_id": "81728900292",
|
| 151 |
-
"check_interval": 10,
|
| 152 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 153 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 154 |
-
},
|
| 155 |
-
{
|
| 156 |
-
"enable": true,
|
| 157 |
-
"type": "douyin_live_record",
|
| 158 |
-
"room_name": "小熊Bella与老爸",
|
| 159 |
-
"room_id": "139751520143",
|
| 160 |
-
"check_interval": 10,
|
| 161 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 162 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 163 |
-
},
|
| 164 |
-
{
|
| 165 |
-
"enable": true,
|
| 166 |
-
"type": "douyin_live_record",
|
| 167 |
-
"room_name": "清源之虎",
|
| 168 |
-
"room_id": "998621457719",
|
| 169 |
-
"check_interval": 10,
|
| 170 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 171 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 172 |
-
},
|
| 173 |
-
{
|
| 174 |
-
"enable": true,
|
| 175 |
-
"type": "douyin_live_record",
|
| 176 |
-
"room_name": "老陈真是好人",
|
| 177 |
-
"room_id": "599130203190",
|
| 178 |
-
"check_interval": 10,
|
| 179 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 180 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 181 |
-
},
|
| 182 |
-
{
|
| 183 |
-
"enable": true,
|
| 184 |
-
"type": "douyin_live_record",
|
| 185 |
-
"room_name": "老陈小帮手",
|
| 186 |
-
"room_id": "738682070097",
|
| 187 |
-
"check_interval": 10,
|
| 188 |
-
"output_video_dir": "data/live_records/douyin/陈杰森Live",
|
| 189 |
-
"output_video_info_file": "data/live_records/douyin/陈杰森Live/file_info.json"
|
| 190 |
-
},
|
| 191 |
-
{
|
| 192 |
-
"enable": true,
|
| 193 |
-
"type": "douyin_live_record",
|
| 194 |
-
"room_name": "吕晓彤",
|
| 195 |
-
"room_id": "25132757833",
|
| 196 |
-
"check_interval": 10,
|
| 197 |
-
"output_video_dir": "data/live_records/douyin/吕晓彤Live",
|
| 198 |
-
"output_video_info_file": "data/live_records/douyin/吕晓彤Live/file_info.json"
|
| 199 |
-
},
|
| 200 |
-
{
|
| 201 |
-
"enable": true,
|
| 202 |
-
"type": "douyin_live_record",
|
| 203 |
-
"room_name": "文韬武略",
|
| 204 |
-
"room_id": "1293783051",
|
| 205 |
-
"check_interval": 10,
|
| 206 |
-
"output_video_dir": "data/live_records/douyin/文韬武略Live",
|
| 207 |
-
"output_video_info_file": "data/live_records/douyin/文韬武略Live/file_info.json"
|
| 208 |
-
},
|
| 209 |
-
{
|
| 210 |
-
"enable": true,
|
| 211 |
-
"type": "douyin_live_to_bilibili",
|
| 212 |
-
"room_name": "老陈的退路",
|
| 213 |
-
"room_id": "330025930592",
|
| 214 |
-
"check_interval": 10,
|
| 215 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 216 |
-
},
|
| 217 |
-
{
|
| 218 |
-
"enable": true,
|
| 219 |
-
"type": "douyin_live_to_bilibili",
|
| 220 |
-
"room_name": "老陈come_back",
|
| 221 |
-
"room_id": "78835697536",
|
| 222 |
-
"check_interval": 10,
|
| 223 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 224 |
-
},
|
| 225 |
-
{
|
| 226 |
-
"enable": true,
|
| 227 |
-
"type": "douyin_live_to_bilibili",
|
| 228 |
-
"room_name": "清源第一帅",
|
| 229 |
-
"room_id": "654177813521",
|
| 230 |
-
"check_interval": 10,
|
| 231 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 232 |
-
},
|
| 233 |
-
{
|
| 234 |
-
"enable": true,
|
| 235 |
-
"type": "douyin_live_to_bilibili",
|
| 236 |
-
"room_name": "清源人工智能研究院",
|
| 237 |
-
"room_id": "81728900292",
|
| 238 |
-
"check_interval": 10,
|
| 239 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 240 |
-
},
|
| 241 |
-
{
|
| 242 |
-
"enable": true,
|
| 243 |
-
"type": "douyin_live_to_bilibili",
|
| 244 |
-
"room_name": "小熊Bella与老爸",
|
| 245 |
-
"room_id": "139751520143",
|
| 246 |
-
"check_interval": 10,
|
| 247 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 248 |
-
},
|
| 249 |
-
{
|
| 250 |
-
"enable": true,
|
| 251 |
-
"type": "douyin_live_to_bilibili",
|
| 252 |
-
"room_name": "清源之虎",
|
| 253 |
-
"room_id": "998621457719",
|
| 254 |
-
"check_interval": 10,
|
| 255 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 256 |
-
},
|
| 257 |
-
{
|
| 258 |
-
"enable": true,
|
| 259 |
-
"type": "douyin_live_to_bilibili",
|
| 260 |
-
"room_name": "老陈真是好人",
|
| 261 |
-
"room_id": "599130203190",
|
| 262 |
-
"check_interval": 10,
|
| 263 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 264 |
-
},
|
| 265 |
-
{
|
| 266 |
-
"enable": true,
|
| 267 |
-
"type": "douyin_live_to_bilibili",
|
| 268 |
-
"room_name": "老陈小帮手",
|
| 269 |
-
"room_id": "738682070097",
|
| 270 |
-
"check_interval": 10,
|
| 271 |
-
"key_of_credentials": "bilibili_chenjiesen_credentials"
|
| 272 |
-
}
|
| 273 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/{douyin_live_info_collect.json → tasks/douyin_live_info_collect.json}
RENAMED
|
File without changes
|
main.py
CHANGED
|
@@ -23,6 +23,7 @@ nohup python3 main.py --server_port 7871 &
|
|
| 23 |
import argparse
|
| 24 |
import asyncio
|
| 25 |
import logging
|
|
|
|
| 26 |
import platform
|
| 27 |
import time
|
| 28 |
import threading
|
|
@@ -47,8 +48,8 @@ logger = logging.getLogger("main")
|
|
| 47 |
def get_args():
|
| 48 |
parser = argparse.ArgumentParser()
|
| 49 |
parser.add_argument(
|
| 50 |
-
"--
|
| 51 |
-
default=(project_path / "data/
|
| 52 |
type=str
|
| 53 |
)
|
| 54 |
parser.add_argument(
|
|
@@ -102,15 +103,25 @@ def async_thread_wrapper(coro_task):
|
|
| 102 |
def main():
|
| 103 |
args = get_args()
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
# ui
|
| 116 |
with gr.Blocks() as blocks:
|
|
|
|
| 23 |
import argparse
|
| 24 |
import asyncio
|
| 25 |
import logging
|
| 26 |
+
from pathlib import Path
|
| 27 |
import platform
|
| 28 |
import time
|
| 29 |
import threading
|
|
|
|
| 48 |
def get_args():
|
| 49 |
parser = argparse.ArgumentParser()
|
| 50 |
parser.add_argument(
|
| 51 |
+
"--porter_tasks_file_dir",
|
| 52 |
+
default=(project_path / "data/porter_tasks").as_posix(),
|
| 53 |
type=str
|
| 54 |
)
|
| 55 |
parser.add_argument(
|
|
|
|
| 103 |
def main():
|
| 104 |
args = get_args()
|
| 105 |
|
| 106 |
+
porter_tasks_file_dir = Path(args.porter_tasks_file_dir)
|
| 107 |
+
|
| 108 |
+
for porter_task_file in porter_tasks_file_dir.glob("porter_task_*.json"):
|
| 109 |
+
key = porter_task_file.stem
|
| 110 |
+
value = environment.get(key=key, default=False, dtype=bool)
|
| 111 |
+
logger.info(f"{key}: {value}")
|
| 112 |
+
|
| 113 |
+
if value is True:
|
| 114 |
+
# porter manager
|
| 115 |
+
task_manager = PorterManager(
|
| 116 |
+
tasks_file=porter_task_file.as_posix()
|
| 117 |
+
)
|
| 118 |
+
task_thread = threading.Thread(
|
| 119 |
+
target=async_thread_wrapper,
|
| 120 |
+
args=(task_manager.run(),),
|
| 121 |
+
daemon=True
|
| 122 |
+
)
|
| 123 |
+
task_thread.start()
|
| 124 |
+
time.sleep(5)
|
| 125 |
|
| 126 |
# ui
|
| 127 |
with gr.Blocks() as blocks:
|
toolbox/bilibili/live/live_manager.py
CHANGED
|
@@ -108,7 +108,7 @@ class BilibiliLiveManager(BilibiliClient):
|
|
| 108 |
js = response.json()
|
| 109 |
return js
|
| 110 |
|
| 111 |
-
def get_rtmp_publish_cmd_by_flv_file(self, input_source: str):
|
| 112 |
js = self.get_rtmp_info_by_room_id()
|
| 113 |
# print(json.dumps(js, ensure_ascii=False, indent=4))
|
| 114 |
rtmp_code = js["data"]["rtmp"]["code"]
|
|
@@ -118,46 +118,47 @@ class BilibiliLiveManager(BilibiliClient):
|
|
| 118 |
|
| 119 |
# cmd = f'ffmpeg -re -i "{input_source}" -c copy -f flv -flvflags no_duration_filesize "{rtmp_url}"'
|
| 120 |
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
|
|
|
| 161 |
cmd_str = " ".join(cmd_str)
|
| 162 |
cmd = RtmpPublishCMD(
|
| 163 |
cmd_list=cmd_list,
|
|
|
|
| 108 |
js = response.json()
|
| 109 |
return js
|
| 110 |
|
| 111 |
+
def get_rtmp_publish_cmd_by_flv_file(self, input_source: str, do_copy: bool = True):
|
| 112 |
js = self.get_rtmp_info_by_room_id()
|
| 113 |
# print(json.dumps(js, ensure_ascii=False, indent=4))
|
| 114 |
rtmp_code = js["data"]["rtmp"]["code"]
|
|
|
|
| 118 |
|
| 119 |
# cmd = f'ffmpeg -re -i "{input_source}" -c copy -f flv -flvflags no_duration_filesize "{rtmp_url}"'
|
| 120 |
|
| 121 |
+
if do_copy:
|
| 122 |
+
cmd_list = [
|
| 123 |
+
"ffmpeg",
|
| 124 |
+
"-i", input_source,
|
| 125 |
+
"-c", "copy",
|
| 126 |
+
"-f", "flv",
|
| 127 |
+
rtmp_url
|
| 128 |
+
]
|
| 129 |
+
cmd_str = [
|
| 130 |
+
"ffmpeg",
|
| 131 |
+
'-i', f'"{input_source}"',
|
| 132 |
+
"-c", "copy",
|
| 133 |
+
"-f", "flv",
|
| 134 |
+
f'"{rtmp_url}"'
|
| 135 |
+
]
|
| 136 |
+
else:
|
| 137 |
+
cmd_list = [
|
| 138 |
+
"ffmpeg",
|
| 139 |
+
"-re",
|
| 140 |
+
"-i", input_source,
|
| 141 |
+
"-c:v", "libx264",
|
| 142 |
+
"-preset", "veryfast",
|
| 143 |
+
"-b:v", "1500k",
|
| 144 |
+
"-c:a", "aac",
|
| 145 |
+
"-b:a", "128k",
|
| 146 |
+
"-f", "flv",
|
| 147 |
+
rtmp_url
|
| 148 |
+
]
|
| 149 |
+
cmd_str = [
|
| 150 |
+
"ffmpeg",
|
| 151 |
+
"-re",
|
| 152 |
+
'-i', f'"{input_source}"',
|
| 153 |
+
"-c:v", "libx264",
|
| 154 |
+
"-preset", "veryfast",
|
| 155 |
+
"-b:v", "1500k",
|
| 156 |
+
"-c:a", "aac",
|
| 157 |
+
"-b:a", "128k",
|
| 158 |
+
"-f", "flv",
|
| 159 |
+
f'"{rtmp_url}"'
|
| 160 |
+
]
|
| 161 |
+
|
| 162 |
cmd_str = " ".join(cmd_str)
|
| 163 |
cmd = RtmpPublishCMD(
|
| 164 |
cmd_list=cmd_list,
|
toolbox/porter/tasks/__init__.py
CHANGED
|
@@ -3,7 +3,9 @@
|
|
| 3 |
from .douyin_live_info_collect_task import DouyinLiveInfoCollectTask
|
| 4 |
from .douyin_video_download_task import DouyinVideoDownloadTask
|
| 5 |
from .douyin_live_record_task import DouyinLiveRecordTask
|
| 6 |
-
from .
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
if __name__ == "__main__":
|
|
|
|
| 3 |
from .douyin_live_info_collect_task import DouyinLiveInfoCollectTask
|
| 4 |
from .douyin_video_download_task import DouyinVideoDownloadTask
|
| 5 |
from .douyin_live_record_task import DouyinLiveRecordTask
|
| 6 |
+
from .douyin_live_to_bilibili_live_task import DouyinLiveToBilibiliLiveTask
|
| 7 |
+
from .video_to_bilibili_task import VideoToBilibiliTask
|
| 8 |
+
from .video_to_youtube_task import VideoToYoutubeTask
|
| 9 |
|
| 10 |
|
| 11 |
if __name__ == "__main__":
|
toolbox/porter/tasks/{douyin_live_to_bilibili_task.py → douyin_live_to_bilibili_live_task.py}
RENAMED
|
@@ -7,22 +7,13 @@ from datetime import datetime
|
|
| 7 |
from zoneinfo import ZoneInfo # Python 3.9+ 自带,无需安装
|
| 8 |
import logging
|
| 9 |
import json
|
| 10 |
-
import os
|
| 11 |
import random
|
| 12 |
-
import re
|
| 13 |
import subprocess
|
| 14 |
-
from pathlib import Path
|
| 15 |
import traceback
|
| 16 |
from typing import Dict, List, Optional, Tuple, Union, Iterable
|
| 17 |
-
import time
|
| 18 |
import shutil
|
| 19 |
|
| 20 |
import numpy as np
|
| 21 |
-
import streamlink
|
| 22 |
-
from streamlink.stream import StreamIO, HTTPStream
|
| 23 |
-
from streamlink_cli.main import open_stream
|
| 24 |
-
from streamlink_cli.output import FileOutput
|
| 25 |
-
from streamlink_cli.streamrunner import StreamRunner
|
| 26 |
|
| 27 |
logger = logging.getLogger("toolbox")
|
| 28 |
|
|
@@ -32,8 +23,8 @@ from toolbox.bilibili.live.live_manager import BilibiliLiveManager, RtmpPublishC
|
|
| 32 |
from project_settings import environment, project_path
|
| 33 |
|
| 34 |
|
| 35 |
-
@BaseTask.register("
|
| 36 |
-
class
|
| 37 |
def __init__(self,
|
| 38 |
room_name: str,
|
| 39 |
room_id: str,
|
|
@@ -168,11 +159,14 @@ class DouyinLiveToBilibiliTask(BaseTask):
|
|
| 168 |
return None
|
| 169 |
|
| 170 |
cmd = self.bilibili_client.get_rtmp_publish_cmd_by_flv_file(
|
| 171 |
-
input_source=live_url
|
|
|
|
| 172 |
)
|
| 173 |
await asyncio.to_thread(
|
| 174 |
self.blocking_stream, cmd
|
| 175 |
)
|
|
|
|
|
|
|
| 176 |
|
| 177 |
def blocking_stream(self, cmd: RtmpPublishCMD):
|
| 178 |
_ = self.bilibili_client.stop_live()
|
|
|
|
| 7 |
from zoneinfo import ZoneInfo # Python 3.9+ 自带,无需安装
|
| 8 |
import logging
|
| 9 |
import json
|
|
|
|
| 10 |
import random
|
|
|
|
| 11 |
import subprocess
|
|
|
|
| 12 |
import traceback
|
| 13 |
from typing import Dict, List, Optional, Tuple, Union, Iterable
|
|
|
|
| 14 |
import shutil
|
| 15 |
|
| 16 |
import numpy as np
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
logger = logging.getLogger("toolbox")
|
| 19 |
|
|
|
|
| 23 |
from project_settings import environment, project_path
|
| 24 |
|
| 25 |
|
| 26 |
+
@BaseTask.register("douyin_live_to_bilibili_live")
|
| 27 |
+
class DouyinLiveToBilibiliLiveTask(BaseTask):
|
| 28 |
def __init__(self,
|
| 29 |
room_name: str,
|
| 30 |
room_id: str,
|
|
|
|
| 159 |
return None
|
| 160 |
|
| 161 |
cmd = self.bilibili_client.get_rtmp_publish_cmd_by_flv_file(
|
| 162 |
+
input_source=live_url,
|
| 163 |
+
do_copy=True
|
| 164 |
)
|
| 165 |
await asyncio.to_thread(
|
| 166 |
self.blocking_stream, cmd
|
| 167 |
)
|
| 168 |
+
# 每次开直播后须暂停一段时间,以避免频繁操作。
|
| 169 |
+
await asyncio.sleep(3600 * 1)
|
| 170 |
|
| 171 |
def blocking_stream(self, cmd: RtmpPublishCMD):
|
| 172 |
_ = self.bilibili_client.stop_live()
|
toolbox/porter/tasks/douyin_video_download_task.py
CHANGED
|
@@ -91,7 +91,7 @@ class DouyinVideoDownloadTask(BaseTask):
|
|
| 91 |
video_info_dict: dict = await self.load_downloaded_video_info()
|
| 92 |
title_set = set()
|
| 93 |
for k, v in video_info_dict.items():
|
| 94 |
-
title = v["title"]
|
| 95 |
title_set.add(title)
|
| 96 |
return title_set
|
| 97 |
|
|
|
|
| 91 |
video_info_dict: dict = await self.load_downloaded_video_info()
|
| 92 |
title_set = set()
|
| 93 |
for k, v in video_info_dict.items():
|
| 94 |
+
title = v["title"][:30]
|
| 95 |
title_set.add(title)
|
| 96 |
return title_set
|
| 97 |
|
toolbox/porter/tasks/video_to_bilibili_task.py
CHANGED
|
@@ -97,7 +97,7 @@ class VideoToBilibiliTask(BaseTask):
|
|
| 97 |
for k, v in video_info.items():
|
| 98 |
create_time = v["create_time"]
|
| 99 |
filename = v["filename"]
|
| 100 |
-
|
| 101 |
# video_id = v["video_id"]
|
| 102 |
title = v["title"]
|
| 103 |
desc = v["desc"]
|
|
@@ -110,7 +110,7 @@ class VideoToBilibiliTask(BaseTask):
|
|
| 110 |
break
|
| 111 |
title_and_tags += f" #{tag}"
|
| 112 |
|
| 113 |
-
create_time_ = datetime.strptime(create_time, "%Y%m%
|
| 114 |
min_date_ = datetime.strptime(self.min_date, "%Y-%m-%d %H:%M:%S")
|
| 115 |
|
| 116 |
if create_time_ < min_date_:
|
|
@@ -120,10 +120,6 @@ class VideoToBilibiliTask(BaseTask):
|
|
| 120 |
if bilibili_video_id is None:
|
| 121 |
logger.info(f"{self.flag}新视频:{filename}")
|
| 122 |
|
| 123 |
-
credentials_info = environment.get(self.key_of_credentials, dtype=json.loads)
|
| 124 |
-
video_manager = BilibiliVideoDraftUploader()
|
| 125 |
-
video_manager.login_with_credentials_info(credentials_info=credentials_info)
|
| 126 |
-
|
| 127 |
metadata = {
|
| 128 |
"title": title_and_tags,
|
| 129 |
"desc": desc,
|
|
@@ -141,7 +137,7 @@ class VideoToBilibiliTask(BaseTask):
|
|
| 141 |
continue
|
| 142 |
logger.info(f"{self.flag}上传视频:{filename}")
|
| 143 |
video_id = await asyncio.to_thread(
|
| 144 |
-
|
| 145 |
filename=filename,
|
| 146 |
metadata=metadata,
|
| 147 |
)
|
|
|
|
| 97 |
for k, v in video_info.items():
|
| 98 |
create_time = v["create_time"]
|
| 99 |
filename = v["filename"]
|
| 100 |
+
# video_url_list = v["video_url_list"]
|
| 101 |
# video_id = v["video_id"]
|
| 102 |
title = v["title"]
|
| 103 |
desc = v["desc"]
|
|
|
|
| 110 |
break
|
| 111 |
title_and_tags += f" #{tag}"
|
| 112 |
|
| 113 |
+
create_time_ = datetime.strptime(create_time, "%Y%m%dT%H%M%S")
|
| 114 |
min_date_ = datetime.strptime(self.min_date, "%Y-%m-%d %H:%M:%S")
|
| 115 |
|
| 116 |
if create_time_ < min_date_:
|
|
|
|
| 120 |
if bilibili_video_id is None:
|
| 121 |
logger.info(f"{self.flag}新视频:{filename}")
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
metadata = {
|
| 124 |
"title": title_and_tags,
|
| 125 |
"desc": desc,
|
|
|
|
| 137 |
continue
|
| 138 |
logger.info(f"{self.flag}上传视频:{filename}")
|
| 139 |
video_id = await asyncio.to_thread(
|
| 140 |
+
self.bilibili_video_manager.upload_video_draft_and_publish,
|
| 141 |
filename=filename,
|
| 142 |
metadata=metadata,
|
| 143 |
)
|
toolbox/porter/tasks/video_to_youtube_task.py
CHANGED
|
@@ -115,7 +115,7 @@ class VideoToYoutubeTask(BaseTask):
|
|
| 115 |
break
|
| 116 |
title_and_tags += f" #{tag}"
|
| 117 |
|
| 118 |
-
create_time_ = datetime.strptime(create_time, "%Y%m%
|
| 119 |
min_date_ = datetime.strptime(self.min_date, "%Y-%m-%d %H:%M:%S")
|
| 120 |
|
| 121 |
if create_time_ < min_date_:
|
|
|
|
| 115 |
break
|
| 116 |
title_and_tags += f" #{tag}"
|
| 117 |
|
| 118 |
+
create_time_ = datetime.strptime(create_time, "%Y%m%dT%H%M%S")
|
| 119 |
min_date_ = datetime.strptime(self.min_date, "%Y-%m-%d %H:%M:%S")
|
| 120 |
|
| 121 |
if create_time_ < min_date_:
|