- if pubdate is not None:
- pubdate = parse(pubdate)
- tzinfo = pubdate.tzinfo
- now = datetime.datetime.now(tzinfo)
- delta = (now - pubdate).total_seconds() / (60 * 60 * 24)
- if delta > n:
- return True
- return False
-
- def item_is_interesting_for_article(self, title, description, item):
+ if pubdate is None:
+ return False
+ pubdate = parse(pubdate)
+ tzinfo = pubdate.tzinfo
+ now = datetime.datetime.now(tzinfo)
+ delta = (now - pubdate).total_seconds() / (60 * 60 * 24)
+ return delta > n
+
+ def item_is_interesting_for_article(
+ self, title: str, description: str, item: ET.Element
+ ) -> bool: