Spaces:
Paused
Paused
update
Browse files
data/porter_tasks/porter_task_laoa_douyin_video_to_youtube.json
CHANGED
|
@@ -103,6 +103,71 @@
|
|
| 103 |
"allowed_max_duration_in_s": 900,
|
| 104 |
"allowed_must_width_less_equal_height": true
|
| 105 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
{
|
| 107 |
"enable": true,
|
| 108 |
"type": "video_to_youtube",
|
|
|
|
| 103 |
"allowed_max_duration_in_s": 900,
|
| 104 |
"allowed_must_width_less_equal_height": true
|
| 105 |
},
|
| 106 |
+
{
|
| 107 |
+
"enable": true,
|
| 108 |
+
"type": "douyin_video_download",
|
| 109 |
+
"user_name": "Brilliant_Xx",
|
| 110 |
+
"sec_user_id": "MS4wLjABAAAAC4q8A1sWZqN4UJUdc2oA5V5Pv6jPUyuGjEFjMe4tr_o",
|
| 111 |
+
"check_interval": 900,
|
| 112 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 113 |
+
"min_date2": "2026-01-10 00:00:00",
|
| 114 |
+
"output_video_dir": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线",
|
| 115 |
+
"output_video_info_file": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线/file_info.json",
|
| 116 |
+
"allowed_max_duration_in_s": 900,
|
| 117 |
+
"allowed_must_width_less_equal_height": true
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"enable": true,
|
| 121 |
+
"type": "douyin_video_download",
|
| 122 |
+
"user_name": "青枫2026",
|
| 123 |
+
"sec_user_id": "MS4wLjABAAAAbVmWbLy67N58OU_P7GmUhBTCj4BaLzVFbaXJdB2FEHC2qmL-GckPa8E3c8haDKSd",
|
| 124 |
+
"check_interval": 900,
|
| 125 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 126 |
+
"min_date2": "2026-01-10 00:00:00",
|
| 127 |
+
"output_video_dir": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线",
|
| 128 |
+
"output_video_info_file": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线/file_info.json",
|
| 129 |
+
"allowed_max_duration_in_s": 900,
|
| 130 |
+
"allowed_must_width_less_equal_height": true
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"enable": true,
|
| 134 |
+
"type": "douyin_video_download",
|
| 135 |
+
"user_name": "、丶",
|
| 136 |
+
"sec_user_id": "MS4wLjABAAAAf_FjIWwJxMCFiyqhZmLAybhPyjQoDkv6T4b3cZiMP1M",
|
| 137 |
+
"check_interval": 900,
|
| 138 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 139 |
+
"min_date2": "2026-01-10 00:00:00",
|
| 140 |
+
"output_video_dir": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线",
|
| 141 |
+
"output_video_info_file": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线/file_info.json",
|
| 142 |
+
"allowed_max_duration_in_s": 900,
|
| 143 |
+
"allowed_must_width_less_equal_height": true
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"enable": true,
|
| 147 |
+
"type": "douyin_video_download",
|
| 148 |
+
"user_name": "赤色世纪",
|
| 149 |
+
"sec_user_id": "MS4wLjABAAAALKP8r-GB9g702pjviRekISUVMwZbQ8o3-bAPUenkRI260igZ5xVqPdgtRHlnm6kx",
|
| 150 |
+
"check_interval": 900,
|
| 151 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 152 |
+
"min_date2": "2026-01-10 00:00:00",
|
| 153 |
+
"output_video_dir": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线",
|
| 154 |
+
"output_video_info_file": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线/file_info.json",
|
| 155 |
+
"allowed_max_duration_in_s": 900,
|
| 156 |
+
"allowed_must_width_less_equal_height": true
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"enable": true,
|
| 160 |
+
"type": "douyin_video_download",
|
| 161 |
+
"user_name": "白马啸西风",
|
| 162 |
+
"sec_user_id": "MS4wLjABAAAAdiZ1OmeHzY0-HZ-Pczh6TOp9OABfbevpCG5sNeSQAJE",
|
| 163 |
+
"check_interval": 900,
|
| 164 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 165 |
+
"min_date2": "2026-01-10 00:00:00",
|
| 166 |
+
"output_video_dir": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线",
|
| 167 |
+
"output_video_info_file": "data/tasks/laoa_douyin_video_to_youtube/video/douyin/牢A斩杀线/file_info.json",
|
| 168 |
+
"allowed_max_duration_in_s": 900,
|
| 169 |
+
"allowed_must_width_less_equal_height": true
|
| 170 |
+
},
|
| 171 |
{
|
| 172 |
"enable": true,
|
| 173 |
"type": "video_to_youtube",
|
data/porter_tasks/porter_task_songkewei_douyin_video_to_youtube.json
CHANGED
|
@@ -98,6 +98,61 @@
|
|
| 98 |
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 99 |
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 100 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
{
|
| 102 |
"enable": true,
|
| 103 |
"type": "video_to_youtube",
|
|
|
|
| 98 |
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 99 |
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 100 |
},
|
| 101 |
+
{
|
| 102 |
+
"enable": true,
|
| 103 |
+
"type": "douyin_video_download",
|
| 104 |
+
"user_name": "Brilliant_Xx",
|
| 105 |
+
"sec_user_id": "MS4wLjABAAAAC4q8A1sWZqN4UJUdc2oA5V5Pv6jPUyuGjEFjMe4tr_o",
|
| 106 |
+
"check_interval": 900,
|
| 107 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 108 |
+
"min_date2": "2020-12-27 00:00:00",
|
| 109 |
+
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 110 |
+
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"enable": true,
|
| 114 |
+
"type": "douyin_video_download",
|
| 115 |
+
"user_name": "青枫2026",
|
| 116 |
+
"sec_user_id": "MS4wLjABAAAAbVmWbLy67N58OU_P7GmUhBTCj4BaLzVFbaXJdB2FEHC2qmL-GckPa8E3c8haDKSd",
|
| 117 |
+
"check_interval": 900,
|
| 118 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 119 |
+
"min_date2": "2020-12-27 00:00:00",
|
| 120 |
+
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 121 |
+
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"enable": true,
|
| 125 |
+
"type": "douyin_video_download",
|
| 126 |
+
"user_name": "、丶",
|
| 127 |
+
"sec_user_id": "MS4wLjABAAAAf_FjIWwJxMCFiyqhZmLAybhPyjQoDkv6T4b3cZiMP1M",
|
| 128 |
+
"check_interval": 900,
|
| 129 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 130 |
+
"min_date2": "2020-12-27 00:00:00",
|
| 131 |
+
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 132 |
+
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"enable": true,
|
| 136 |
+
"type": "douyin_video_download",
|
| 137 |
+
"user_name": "赤色世纪",
|
| 138 |
+
"sec_user_id": "MS4wLjABAAAALKP8r-GB9g702pjviRekISUVMwZbQ8o3-bAPUenkRI260igZ5xVqPdgtRHlnm6kx",
|
| 139 |
+
"check_interval": 900,
|
| 140 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 141 |
+
"min_date2": "2020-12-27 00:00:00",
|
| 142 |
+
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 143 |
+
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"enable": true,
|
| 147 |
+
"type": "douyin_video_download",
|
| 148 |
+
"user_name": "白马啸西风",
|
| 149 |
+
"sec_user_id": "MS4wLjABAAAAdiZ1OmeHzY0-HZ-Pczh6TOp9OABfbevpCG5sNeSQAJE",
|
| 150 |
+
"check_interval": 900,
|
| 151 |
+
"key_of_credentials": "douyin_wentao_credentials",
|
| 152 |
+
"min_date2": "2020-12-27 00:00:00",
|
| 153 |
+
"output_video_dir": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为",
|
| 154 |
+
"output_video_info_file": "data/tasks/songkewei_douyin_video_to_youtube/video/douyin/宋可为/file_info.json"
|
| 155 |
+
},
|
| 156 |
{
|
| 157 |
"enable": true,
|
| 158 |
"type": "video_to_youtube",
|
toolbox/hf_netdisk/netdisk/netdisk_client.py
CHANGED
|
@@ -173,5 +173,63 @@ def main2():
|
|
| 173 |
return
|
| 174 |
|
| 175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
if __name__ == "__main__":
|
| 177 |
-
|
|
|
|
| 173 |
return
|
| 174 |
|
| 175 |
|
| 176 |
+
def main3():
|
| 177 |
+
args = get_args()
|
| 178 |
+
|
| 179 |
+
import log
|
| 180 |
+
from project_settings import environment, project_path, temp_directory, log_directory, time_zone_info
|
| 181 |
+
|
| 182 |
+
log.setup_size_rotating(log_directory=log_directory, tz_info=time_zone_info)
|
| 183 |
+
|
| 184 |
+
hf_token = environment.get(key=args.key_of_credentials)
|
| 185 |
+
|
| 186 |
+
client = NetdiskClient(
|
| 187 |
+
hf_token=hf_token,
|
| 188 |
+
)
|
| 189 |
+
|
| 190 |
+
file_list = client.query_files(
|
| 191 |
+
repo_id="tianxing1994/hf_netdisk",
|
| 192 |
+
)
|
| 193 |
+
|
| 194 |
+
for filename in file_list:
|
| 195 |
+
filename = Path(filename)
|
| 196 |
+
parts_count = len(filename.parts)
|
| 197 |
+
if parts_count < 5:
|
| 198 |
+
continue
|
| 199 |
+
platform = filename.parts[-5]
|
| 200 |
+
user_type = filename.parts[-4]
|
| 201 |
+
user_name = filename.parts[-3]
|
| 202 |
+
date = filename.parts[-2]
|
| 203 |
+
name = filename.name
|
| 204 |
+
|
| 205 |
+
if platform not in ("xianyu",):
|
| 206 |
+
continue
|
| 207 |
+
if user_type not in ("customers",):
|
| 208 |
+
continue
|
| 209 |
+
if user_name not in ("陈杰森",):
|
| 210 |
+
continue
|
| 211 |
+
if date not in ("20260119",):
|
| 212 |
+
continue
|
| 213 |
+
|
| 214 |
+
cache_dir = temp_directory / "hf_cache_dir"
|
| 215 |
+
|
| 216 |
+
target_file = temp_directory / f"{platform}/{user_type}/{user_name}/{date}/{name[1:16]}.mp4"
|
| 217 |
+
target_file.parent.mkdir(parents=True, exist_ok=True)
|
| 218 |
+
map_target_file = temp_directory / f"{platform}/{user_type}/{user_name}/{date}/file.txt"
|
| 219 |
+
with open(map_target_file.as_posix(), "a+") as f:
|
| 220 |
+
f.write(f"file '{name[1:16]}.mp4'\n")
|
| 221 |
+
|
| 222 |
+
if target_file.exists():
|
| 223 |
+
continue
|
| 224 |
+
print(f"downloading; src_file: {filename.as_posix()}, tgt_file: {target_file.as_posix()}")
|
| 225 |
+
client.download_file(
|
| 226 |
+
remote_file=filename.as_posix(),
|
| 227 |
+
local_file=target_file.as_posix(),
|
| 228 |
+
repo_id="tianxing1994/hf_netdisk",
|
| 229 |
+
cache_dir=cache_dir.as_posix(),
|
| 230 |
+
)
|
| 231 |
+
return
|
| 232 |
+
|
| 233 |
+
|
| 234 |
if __name__ == "__main__":
|
| 235 |
+
main3()
|