diff --git a/gen_feed.py b/gen_feed.py index 0af08cf..73c3962 100644 --- a/gen_feed.py +++ b/gen_feed.py @@ -29,8 +29,7 @@ class Article: publish_date_time = soup.find("meta", property="article:published_time")[ "content" ] - self.date = datetime.datetime.strptime(publish_date_time, "%Y-%m-%dT%H:%M:%SZ") - self.date = self.date.replace(tzinfo=ZoneInfo("UTC")) + self.date = datetime.datetime.strptime(publish_date_time, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=ZoneInfo("UTC")) # Handle text text = []