Initial commit: Add webtoon downloader
This commit is contained in:
17
rename.py
Normal file
17
rename.py
Normal 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)
|
||||
Reference in New Issue
Block a user