From 4b08c70261cd3d69575d5b380ec628ba86266db8 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 18 Aug 2024 07:17:18 +0200 Subject: [PATCH] fix(wikimore): ensure links from image maps are processed Enhanced link extraction to include `` elements for better handling of image maps. This change ensures that all navigable links within an article, including those from image maps, are processed correctly. Fixes #8. --- src/wikimore/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wikimore/app.py b/src/wikimore/app.py index 266e15b..a37e8db 100644 --- a/src/wikimore/app.py +++ b/src/wikimore/app.py @@ -138,7 +138,7 @@ def wiki_article(project, lang, title): logger.debug(f"Redirect URL: {destination}") return redirect(destination) - for a in soup.find_all("a", href=True): + for a in soup.find_all("a", href=True) + soup.find_all("area", href=True): href = a["href"] if href.startswith("/wiki/"):