#!/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,
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