Skip to content

Commit

Permalink
Properly set the main page.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr committed Nov 15, 2023
1 parent 0e52a49 commit 317bc85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/warc2zim/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def run(self):

self.creator = Creator(
self.full_filename,
main_path="A/index.html",
main_path=self.main_url,
)

self.creator.config_metadata(
Expand Down Expand Up @@ -309,9 +309,9 @@ def find_main_page_metadata(self):
or record.http_headers.get_statuscode() == "200"
)
):
self.main_url = url
self.main_url = self.normalize(url)

if urldefrag(self.main_url).url != url:
if urldefrag(self.main_url).url != self.main_url:
continue

# if we get here, found record for the main page
Expand Down

0 comments on commit 317bc85

Please sign in to comment.