manga-dlp/manga-dlp.py

38 lines
949 B
Python
Raw Normal View History

2022-05-16 16:09:17 +02:00
from mangadlp.input import get_args
import os
import sys
2022-05-20 20:56:40 +02:00
mangadlp_version = "2.1.2"
2022-05-16 16:09:17 +02:00
def get_input():
print(f"Manga-DLP Version {mangadlp_version}")
print("Enter details of the manga you want to download:")
while True:
try:
url_uuid = str(input("Url or UUID: "))
readlist = str(input("List with links (optional): "))
language = str(input("Language: "))
chapters = str(input("Chapters: "))
except KeyboardInterrupt:
exit(1)
except:
continue
else:
break
args = [f"-l {language}", f"-c {chapters}"]
if url_uuid:
args.append(f"-u {url_uuid}")
if readlist:
args.append(f"--read {readlist}")
# start script again with the arguments
os.system(f"python3 manga-dlp.py {' '.join(args)}")
2021-12-19 17:20:34 +01:00
2022-05-04 19:17:12 +02:00
if __name__ == "__main__":
2022-05-16 16:09:17 +02:00
if len(sys.argv) > 1:
get_args()
else:
get_input()