Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Add logging for curated domain retrieval

Daoud Clarke0c28488ee601
diff --git a/mwmbl/crawl.py b/mwmbl/crawl.py
index 1d72fae..db8684f 100644
--- a/mwmbl/crawl.py
+++ b/mwmbl/crawl.py
@@ -60,6 +60,7 @@ def _fetch_curated_domains() -> set[str]:
data = response.json()
_curated_domains_cache = {d["name"] for d in data["domains"]}
_curated_domains_fetched_at = now
+ logger.info(f"Fetched {len(_curated_domains_cache)} curated domains")
except Exception:
logger.exception("Failed to fetch curated domains, using cached value")
return _curated_domains_cache