From 377e3f8dbd32567a39e72a3ec6ca66cf8b57186d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 5 Sep 2021 09:51:05 +0200 Subject: Fix lhtranslation after website redesign. Requires user to re-add their manga --- plugins/manganelo.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/manganelo.py') diff --git a/plugins/manganelo.py b/plugins/manganelo.py index b742995..3b86397 100755 --- a/plugins/manganelo.py +++ b/plugins/manganelo.py @@ -22,7 +22,7 @@ def usage_list(): def usage_download(): print("manganelo.py download ") print("examples:") - print(" manganelo.py download \"https://manganelo.com/chapter/read_naruto_manga_online_free3/chapter_700.5\" /home/adam/Manga/MangaName") + print(" manganelo.py download \"https://manganelo.com/chapter/read_naruto_manga_online_free3/chapter_700.5\" /home/user/Manga/MangaName") print("") print("Note: The manga directory has to exist.") exit(1) @@ -56,9 +56,7 @@ def download_file(url, save_path): def list_chapters(url, chapter_list_input): response = requests.get(url) - if response.status_code != 200: - print("Failed to list chapters, server responded with status code %d" % response.status_code) - exit(2) + response.raise_for_status() seen_titles = set() for item in chapter_list_input: @@ -84,9 +82,7 @@ def list_chapters(url, chapter_list_input): def download_chapter(url, download_dir): response = requests.get(url) - if response.status_code != 200: - print("Failed to list chapter images, server responded with status code %d" % response.status_code) - exit(2) + response.raise_for_status() in_progress_filepath = os.path.join(download_dir, ".in_progress") with open(in_progress_filepath, "w") as file: -- cgit v1.2.3