Commit daded0b1a9

daded0b1a98cc6dc5e8d7e653aeab73172088ccd

parent: e70f26efa0

Unsigned

Wraient <wraient.911@gmail.com> · 2024-09-22 14:52 UTC

new way to get path

Layout: unified · split

curd.py +4 −3
@@ -6,6 +6,7 @@
6# anime_id -> episode_list.sh 6# anime_id -> episode_list.sh
7# episode_number -> episdoe_url.sh -> tmp/links 7# episode_number -> episdoe_url.sh -> tmp/links
8 8
9from pathlib import Path
9import re 10import re
10import os 11import os
11import json 12import json
@@ -167,9 +168,9 @@ def load_config() -> dict:
167 # return config_file.read() 168 # return config_file.read()
168 169
169# START OF SCRIPT 170# START OF SCRIPT
170 171current_dir = Path(__file__).parent
171current_dir = os.path.dirname(os.path.abspath(__file__)) 172# current_dir = os.path.dirname(os.path.abspath(__file__))
172# print(current_dir) 173print(current_dir)
173if not os.path.exists(f"{current_dir}/scripts/tmp/"): 174if not os.path.exists(f"{current_dir}/scripts/tmp/"):
174 try: 175 try:
175 os.makedirs(os.path.dirname(f"{current_dir}/scripts/tmp/")) 176 os.makedirs(os.path.dirname(f"{current_dir}/scripts/tmp/"))