This commit is contained in:
Nikolaj
2026-03-19 14:53:33 +01:00
parent cf9176edbd
commit 0de769284c
6 changed files with 399 additions and 95 deletions

View File

@@ -489,15 +489,12 @@ async def _get_card_async(client: httpx.AsyncClient, page_title: str|None = None
card_type_task, wikirank_task, pageviews_task
)
if (
(card_type == CardType.other and instance == "") or
language_count == 0 or
score is None or
views is None
):
error_message = f"Could not generate card '{title}': "
if card_type == CardType.other and instance == "":
error_message += "Not instance of a class"
elif language_count == 0:
if language_count == 0:
error_message += "No language pages found"
elif score is None:
error_message += "No wikirank score"