Initial commit: Add webtoon downloader

This commit is contained in:
2024-12-19 13:58:12 +01:00
commit d5a73f342e
53 changed files with 1173 additions and 0 deletions

17
rename.py Normal file
View File

@@ -0,0 +1,17 @@
import os
from data.path_constant import DOWNLOAD_DIR, NETWORK_DIR
from prerequisite import rename_episodes
rename_episodes(DOWNLOAD_DIR)
rename_episodes(NETWORK_DIR)
for first_level_path in NETWORK_DIR.iterdir():
if first_level_path.name == '怪力亂神':
for second_level_path in first_level_path.iterdir():
if "話." in second_level_path.name:
episode_name = second_level_path.name.replace("話.", "")
new_path = first_level_path / episode_name
print(second_level_path)
print(new_path)
os.rename(second_level_path, new_path)