#!/usr/bin/env python3
import datetime
-import re
from typing import Dict, List, Optional
import xml
# https://www.theurbanist.org/feed/
class urbanist_renderer(gnrss.generic_news_rss_renderer):
- """Read the TheUrbanist feed."""
+ """Read the The Urbanist feed."""
def __init__(
self,
feed_uris: List[str],
page_title: str,
):
- super(urbanist_renderer, self).__init__(
+ super().__init__(
name_to_timeout_dict, feed_site, feed_uris, page_title
)
self.debug = True
def item_is_interesting_for_headlines(
self, title: str, description: str, item: xml.etree.ElementTree.Element
) -> bool:
- return 'the urbanist' not in description.lower()
+ return self.find_pubdate(item) is not None and 'urbanist' not in title.lower()
def do_details(self) -> bool:
return True
def item_is_interesting_for_article(
self, title: str, description: str, item: xml.etree.ElementTree.Element
) -> bool:
- return len(description) > 20
+ return len(description) > 30
# Test