Skip to content

Commit

Permalink
fix(Broken headers for image downloads): 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
thezak48 committed Dec 16, 2023
1 parent 97396da commit 0e243ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions manga_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def download_manga():

for manga_url in manga_urls:
manga = get_website_class(manga_url)
headers_image = manga.headers_image
headers_image.update({"referer": f"{manga_url}"})

chapters, title = manga.get_manga_chapters(manga_url)
chapter_task = progress.add_task(
Expand Down Expand Up @@ -140,7 +142,7 @@ def download_manga():
futures.append(
executor.submit(
ImageDownloader(
log, manga.headers_image
log, headers_image
).download_chapter,
chapter_number,
images,
Expand All @@ -166,7 +168,7 @@ def download_manga():
continue

images = manga.get_chapter_images(chapter_url)
ImageDownloader(log, manga.headers_image).download_chapter(
ImageDownloader(log, headers_image).download_chapter(
chapter_number,
images,
title,
Expand Down
1 change: 0 additions & 1 deletion manga_dl/utilities/sites/madraNew.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class MadraNew:
}

headers_image = base_headers.copy()
headers_image.update({})

def __init__(self, logger):
self.logger = logger
Expand Down
1 change: 0 additions & 1 deletion manga_dl/utilities/sites/madraOld.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class MadraOld:
headers_post.update({})

headers_image = base_headers.copy()
headers_image.update({})

def __init__(self, logger):
self.logger = logger
Expand Down

0 comments on commit 0e243ca

Please sign in to comment.