qgyd2021 commited on
Commit
954f0c2
·
1 Parent(s): c526b1c
data/porter_tasks/porter_task_chenjieshen_douyin_live_record_to_youtube.json CHANGED
@@ -4,6 +4,7 @@
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"
@@ -13,6 +14,7 @@
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"
@@ -22,6 +24,7 @@
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"
@@ -31,6 +34,7 @@
31
  "type": "douyin_live_record",
32
  "room_name": "清源第二帅",
33
  "room_id": "831568261978",
 
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"
@@ -40,6 +44,7 @@
40
  "type": "douyin_live_record",
41
  "room_name": "清源第三帅",
42
  "room_id": "26569028431",
 
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"
@@ -49,6 +54,7 @@
49
  "type": "douyin_live_record",
50
  "room_name": "清源人工智能研究院",
51
  "room_id": "81728900292",
 
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"
@@ -58,6 +64,7 @@
58
  "type": "douyin_live_record",
59
  "room_name": "小熊Bella与老爸",
60
  "room_id": "139751520143",
 
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"
@@ -67,6 +74,7 @@
67
  "type": "douyin_live_record",
68
  "room_name": "清源之虎",
69
  "room_id": "998621457719",
 
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"
@@ -76,6 +84,7 @@
76
  "type": "douyin_live_record",
77
  "room_name": "老陈真是好人",
78
  "room_id": "599130203190",
 
79
  "check_interval": 10,
80
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
81
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
@@ -85,6 +94,7 @@
85
  "type": "douyin_live_record",
86
  "room_name": "老陈小帮手",
87
  "room_id": "738682070097",
 
88
  "check_interval": 10,
89
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
90
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
4
  "type": "douyin_live_record",
5
  "room_name": "老陈的退路",
6
  "room_id": "330025930592",
7
+ "key_of_credentials": "douyin_wentao_credentials",
8
  "check_interval": 10,
9
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
10
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
14
  "type": "douyin_live_record",
15
  "room_name": "老陈come_back",
16
  "room_id": "78835697536",
17
+ "key_of_credentials": "douyin_wentao_credentials",
18
  "check_interval": 10,
19
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
20
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
24
  "type": "douyin_live_record",
25
  "room_name": "清源第一帅",
26
  "room_id": "654177813521",
27
+ "key_of_credentials": "douyin_wentao_credentials",
28
  "check_interval": 10,
29
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
30
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
34
  "type": "douyin_live_record",
35
  "room_name": "清源第二帅",
36
  "room_id": "831568261978",
37
+ "key_of_credentials": "douyin_wentao_credentials",
38
  "check_interval": 10,
39
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
40
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
44
  "type": "douyin_live_record",
45
  "room_name": "清源第三帅",
46
  "room_id": "26569028431",
47
+ "key_of_credentials": "douyin_wentao_credentials",
48
  "check_interval": 10,
49
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
50
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
54
  "type": "douyin_live_record",
55
  "room_name": "清源人工智能研究院",
56
  "room_id": "81728900292",
57
+ "key_of_credentials": "douyin_wentao_credentials",
58
  "check_interval": 10,
59
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
60
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
64
  "type": "douyin_live_record",
65
  "room_name": "小熊Bella与老爸",
66
  "room_id": "139751520143",
67
+ "key_of_credentials": "douyin_wentao_credentials",
68
  "check_interval": 10,
69
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
70
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
74
  "type": "douyin_live_record",
75
  "room_name": "清源之虎",
76
  "room_id": "998621457719",
77
+ "key_of_credentials": "douyin_wentao_credentials",
78
  "check_interval": 10,
79
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
80
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
84
  "type": "douyin_live_record",
85
  "room_name": "老陈真是好人",
86
  "room_id": "599130203190",
87
+ "key_of_credentials": "douyin_wentao_credentials",
88
  "check_interval": 10,
89
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
90
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
 
94
  "type": "douyin_live_record",
95
  "room_name": "老陈小帮手",
96
  "room_id": "738682070097",
97
+ "key_of_credentials": "douyin_wentao_credentials",
98
  "check_interval": 10,
99
  "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
100
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
data/porter_tasks/porter_task_chenjieshen_douyin_live_to_bilibili_live.json CHANGED
@@ -5,7 +5,8 @@
5
  "room_name": "老陈的退路",
6
  "room_id": "330025930592",
7
  "check_interval": 10,
8
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
9
  },
10
  {
11
  "enable": true,
@@ -13,7 +14,8 @@
13
  "room_name": "老陈come_back",
14
  "room_id": "78835697536",
15
  "check_interval": 10,
16
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
17
  },
18
  {
19
  "enable": true,
@@ -21,7 +23,8 @@
21
  "room_name": "清源第一帅",
22
  "room_id": "654177813521",
23
  "check_interval": 10,
24
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
25
  },
26
  {
27
  "enable": true,
@@ -29,16 +32,17 @@
29
  "room_name": "清源第二帅",
30
  "room_id": "831568261978",
31
  "check_interval": 10,
32
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
33
  },
34
  {
35
  "enable": true,
36
- "type": "douyin_live_record",
37
  "room_name": "清源第三帅",
38
  "room_id": "26569028431",
39
  "check_interval": 10,
40
- "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森",
41
- "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_youtube/live_record/陈杰森/file_info.json"
42
  },
43
  {
44
  "enable": true,
@@ -46,7 +50,8 @@
46
  "room_name": "清源人工智能研究院",
47
  "room_id": "81728900292",
48
  "check_interval": 10,
49
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
50
  },
51
  {
52
  "enable": true,
@@ -54,7 +59,8 @@
54
  "room_name": "小熊Bella与老爸",
55
  "room_id": "139751520143",
56
  "check_interval": 10,
57
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
58
  },
59
  {
60
  "enable": true,
@@ -62,7 +68,8 @@
62
  "room_name": "清源之虎",
63
  "room_id": "998621457719",
64
  "check_interval": 10,
65
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
66
  },
67
  {
68
  "enable": true,
@@ -70,7 +77,8 @@
70
  "room_name": "老陈真是好人",
71
  "room_id": "599130203190",
72
  "check_interval": 10,
73
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
74
  },
75
  {
76
  "enable": true,
@@ -78,6 +86,7 @@
78
  "room_name": "老陈小帮手",
79
  "room_id": "738682070097",
80
  "check_interval": 10,
81
- "key_of_credentials": "bilibili_chenjiesen_credentials"
 
82
  }
83
  ]
 
5
  "room_name": "老陈的退路",
6
  "room_id": "330025930592",
7
  "check_interval": 10,
8
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
9
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
10
  },
11
  {
12
  "enable": true,
 
14
  "room_name": "老陈come_back",
15
  "room_id": "78835697536",
16
  "check_interval": 10,
17
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
18
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
19
  },
20
  {
21
  "enable": true,
 
23
  "room_name": "清源第一帅",
24
  "room_id": "654177813521",
25
  "check_interval": 10,
26
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
27
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
28
  },
29
  {
30
  "enable": true,
 
32
  "room_name": "清源第二帅",
33
  "room_id": "831568261978",
34
  "check_interval": 10,
35
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
36
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
37
  },
38
  {
39
  "enable": true,
40
+ "type": "douyin_live_to_bilibili_live",
41
  "room_name": "清源第三帅",
42
  "room_id": "26569028431",
43
  "check_interval": 10,
44
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
45
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
46
  },
47
  {
48
  "enable": true,
 
50
  "room_name": "清源人工智能研究院",
51
  "room_id": "81728900292",
52
  "check_interval": 10,
53
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
54
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
55
  },
56
  {
57
  "enable": true,
 
59
  "room_name": "小熊Bella与老爸",
60
  "room_id": "139751520143",
61
  "check_interval": 10,
62
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
63
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
64
  },
65
  {
66
  "enable": true,
 
68
  "room_name": "清源之虎",
69
  "room_id": "998621457719",
70
  "check_interval": 10,
71
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
72
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
73
  },
74
  {
75
  "enable": true,
 
77
  "room_name": "老陈真是好人",
78
  "room_id": "599130203190",
79
  "check_interval": 10,
80
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
81
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
82
  },
83
  {
84
  "enable": true,
 
86
  "room_name": "老陈小帮手",
87
  "room_id": "738682070097",
88
  "check_interval": 10,
89
+ "key_of_douyin_credentials": "douyin_wentao_credentials",
90
+ "key_of_bilibili_credentials": "bilibili_chenjiesen_credentials"
91
  }
92
  ]
data/porter_tasks/porter_task_chenjing_douyin_live_record_to_youtube.json CHANGED
@@ -4,6 +4,7 @@
4
  "type": "douyin_live_record",
5
  "room_name": "大成说创业",
6
  "room_id": "29576618707",
 
7
  "check_interval": 10,
8
  "output_video_dir": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/",
9
  "output_video_info_file": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/清华陈晶/file_info.json"
 
4
  "type": "douyin_live_record",
5
  "room_name": "大成说创业",
6
  "room_id": "29576618707",
7
+ "key_of_credentials": "douyin_wentao_credentials",
8
  "check_interval": 10,
9
  "output_video_dir": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/",
10
  "output_video_info_file": "data/tasks/chenjing_douyin_live_record_to_youtube/live_record/清华陈晶/file_info.json"
data/porter_tasks/porter_task_huchenfeng_douyin_live_record_to_youtube.json CHANGED
@@ -4,6 +4,7 @@
4
  "type": "douyin_live_record",
5
  "room_name": "户子刺身",
6
  "room_id": "84446810554",
 
7
  "check_interval": 10,
8
  "output_video_dir": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风",
9
  "output_video_info_file": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风/file_info.json"
@@ -13,6 +14,7 @@
13
  "type": "douyin_live_record",
14
  "room_name": "户晨风说真话",
15
  "room_id": "49379702184",
 
16
  "check_interval": 10,
17
  "output_video_dir": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风",
18
  "output_video_info_file": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风/file_info.json"
@@ -22,6 +24,7 @@
22
  "type": "douyin_live_record",
23
  "room_name": "户晨风实话实说",
24
  "room_id": "36333641076",
 
25
  "check_interval": 10,
26
  "output_video_dir": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风",
27
  "output_video_info_file": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风/file_info.json"
 
4
  "type": "douyin_live_record",
5
  "room_name": "户子刺身",
6
  "room_id": "84446810554",
7
+ "key_of_credentials": "douyin_wentao_credentials",
8
  "check_interval": 10,
9
  "output_video_dir": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风",
10
  "output_video_info_file": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风/file_info.json"
 
14
  "type": "douyin_live_record",
15
  "room_name": "户晨风说真话",
16
  "room_id": "49379702184",
17
+ "key_of_credentials": "douyin_wentao_credentials",
18
  "check_interval": 10,
19
  "output_video_dir": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风",
20
  "output_video_info_file": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风/file_info.json"
 
24
  "type": "douyin_live_record",
25
  "room_name": "户晨风实话实说",
26
  "room_id": "36333641076",
27
+ "key_of_credentials": "douyin_wentao_credentials",
28
  "check_interval": 10,
29
  "output_video_dir": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风",
30
  "output_video_info_file": "data/tasks/huchenfeng_douyin_live_record_to_youtube/live_record/户晨风/file_info.json"
data/porter_tasks/porter_task_lvxiaotong_douyin_live_record_to_youtube.json CHANGED
@@ -4,6 +4,7 @@
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"
 
4
  "type": "douyin_live_record",
5
  "room_name": "吕晓彤",
6
  "room_id": "25132757833",
7
+ "key_of_credentials": "douyin_wentao_credentials",
8
  "check_interval": 10,
9
  "output_video_dir": "data/tasks/lvxiaotong_douyin_live_record_to_youtube/live_record/吕晓彤",
10
  "output_video_info_file": "data/tasks/lvxiaotong_douyin_live_record_to_youtube/live_record/吕晓彤/file_info.json"
tabs/shell_tab.py CHANGED
@@ -21,6 +21,25 @@ def get_shell_tab():
21
  outputs=[shell_output],
22
  )
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  return locals()
25
 
26
 
 
21
  outputs=[shell_output],
22
  )
23
 
24
+ gr.Examples(
25
+ examples=[
26
+ [
27
+ "echo \"CPU使用率: $(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage \"%\"}')\""
28
+ ],
29
+ [
30
+ "echo \"内存使用: $(free -m | awk '/Mem:/ {printf \"%.1f%%\", $3/$2*100}')\""
31
+ ],
32
+ [
33
+ "echo \"内存总量: $(grep MemTotal /proc/meminfo | awk '{print $2/1024 \" MB\"}')\""
34
+ ],
35
+ [
36
+ "echo \"可用内存: $(grep MemAvailable /proc/meminfo | awk '{print $2/1024 \" MB\"}')\""
37
+ ]
38
+ ],
39
+ inputs=[shell_text],
40
+ outputs=[shell_output],
41
+ )
42
+
43
  return locals()
44
 
45
 
toolbox/porter/tasks/douyin_live_record_task.py CHANGED
@@ -33,6 +33,7 @@ class DouyinLiveRecordTask(BaseTask):
33
  def __init__(self,
34
  room_name: str,
35
  room_id: str,
 
36
  check_interval: int,
37
  output_video_dir: str = "output",
38
  output_video_info_file: str = "output.json",
@@ -43,6 +44,7 @@ class DouyinLiveRecordTask(BaseTask):
43
  )
44
  self.room_name = room_name
45
  self.room_id = room_id
 
46
 
47
  if not os.path.isabs(output_video_dir):
48
  self.output_video_dir = project_path / output_video_dir
@@ -53,7 +55,11 @@ class DouyinLiveRecordTask(BaseTask):
53
  else:
54
  self.output_video_info_file = Path(output_video_info_file)
55
 
 
56
  self.douyin_client = LiveRecording()
 
 
 
57
 
58
  # state
59
  self.ssl_verify = True
 
33
  def __init__(self,
34
  room_name: str,
35
  room_id: str,
36
+ key_of_credentials: str,
37
  check_interval: int,
38
  output_video_dir: str = "output",
39
  output_video_info_file: str = "output.json",
 
44
  )
45
  self.room_name = room_name
46
  self.room_id = room_id
47
+ self.key_of_credentials = key_of_credentials
48
 
49
  if not os.path.isabs(output_video_dir):
50
  self.output_video_dir = project_path / output_video_dir
 
55
  else:
56
  self.output_video_info_file = Path(output_video_info_file)
57
 
58
+ credentials_info = environment.get(self.key_of_credentials, dtype=json.loads)
59
  self.douyin_client = LiveRecording()
60
+ self.douyin_client.login_with_credentials_info(
61
+ credentials_info=credentials_info
62
+ )
63
 
64
  # state
65
  self.ssl_verify = True
toolbox/porter/tasks/douyin_live_to_bilibili_live_task.py CHANGED
@@ -30,7 +30,8 @@ class DouyinLiveToBilibiliLiveTask(BaseTask):
30
  room_name: str,
31
  room_id: str,
32
  check_interval: int,
33
- key_of_credentials: str,
 
34
  ):
35
  super().__init__(
36
  flag=f"[{self.__class__.__name__}_{room_name}]",
@@ -38,12 +39,19 @@ class DouyinLiveToBilibiliLiveTask(BaseTask):
38
  )
39
  self.room_name = room_name
40
  self.room_id = room_id
41
- self.key_of_credentials = key_of_credentials
 
42
 
 
43
  self.douyin_client = DouyinLiveRecording()
 
 
 
 
 
44
  self.bilibili_client = BilibiliLiveManager()
45
  self.bilibili_client.login_with_credentials_info(
46
- credentials_info=environment.get(self.key_of_credentials, dtype=json.loads)
47
  )
48
 
49
  # success_rate
 
30
  room_name: str,
31
  room_id: str,
32
  check_interval: int,
33
+ key_of_douyin_credentials: str,
34
+ key_of_bilibili_credentials: str,
35
  ):
36
  super().__init__(
37
  flag=f"[{self.__class__.__name__}_{room_name}]",
 
39
  )
40
  self.room_name = room_name
41
  self.room_id = room_id
42
+ self.key_of_douyin_credentials = key_of_douyin_credentials
43
+ self.key_of_bilibili_credentials = key_of_bilibili_credentials
44
 
45
+ credentials_info = environment.get(self.key_of_douyin_credentials, dtype=json.loads)
46
  self.douyin_client = DouyinLiveRecording()
47
+ self.douyin_client.login_with_credentials_info(
48
+ credentials_info=credentials_info
49
+ )
50
+
51
+ credentials_info = environment.get(self.key_of_bilibili_credentials, dtype=json.loads)
52
  self.bilibili_client = BilibiliLiveManager()
53
  self.bilibili_client.login_with_credentials_info(
54
+ credentials_info=credentials_info
55
  )
56
 
57
  # success_rate