From 598bd83887755667d9e497d67f25af4a6d48b3de Mon Sep 17 00:00:00 2001 From: Joe Gitta Date: Wed, 27 May 2026 14:12:36 +0000 Subject: [PATCH] deploy: filter global navs from RSS news cache --- browser.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browser.py b/browser.py index 97c0fec..93a59d5 100755 --- a/browser.py +++ b/browser.py @@ -898,6 +898,14 @@ if __name__ == "__main__": # Filter out short noise paragraphs (ads, nav links) if len(p_clean) > 85 and not p_clean.startswith("Follow ") and not p_clean.startswith("Read more") and not "click here" in p_clean.lower() and not "twitter" in p_clean.lower(): + # Standard library blocklist to discard site global header/footer navigation items + ignore_terms = [ + "British Broadcasting Corporation", "Watch Live", "HomeNewsSport", + "Special Series", "Up First", "All Up First Stories", "hide caption", + "LISTEN & FOLLOW", "Morning Edition", "Morning news brief", "Podcast" + ] + if any(term in p_clean for term in ignore_terms): + continue paragraphs.append(p_clean) # Keep top 8 substantial paragraphs