Stop Google News'ing me. master
authorScott Gasch <scott@gasch.org>
Sun, 18 May 2025 17:58:31 +0000 (10:58 -0700)
committerScott Gasch <scott@gasch.org>
Sun, 18 May 2025 17:58:31 +0000 (10:58 -0700)
google_news_rss_renderer.py

index 3acdbb9fa0f7c61fedb7444b2fa1a4ae8320525e..8cbaae888b7fcfa104150dca12c1bf95ea85e087 100644 (file)
@@ -63,12 +63,20 @@ class google_news_rss_renderer(generic_news_rss_renderer.generic_news_rss_render
     def item_is_interesting_for_headlines(
         self, title: str, description: str, item: xml.etree.ElementTree.Element
     ) -> bool:
-        return not self.is_item_older_than_n_days(item, 2)
+        return (
+            not self.is_item_older_than_n_days(item, 2)
+            and title != "Google News"
+            and description != "Google News"
+        )
 
     def item_is_interesting_for_article(
         self, title: str, description: str, item: xml.etree.ElementTree.Element
     ) -> bool:
-        return not self.is_item_older_than_n_days(item, 2)
+        return (
+            not self.is_item_older_than_n_days(item, 2)
+            and title != "Google News"
+            and description != "Google News"
+        )
 
 
 # Test