One liner
This commit is contained in:
parent
8a059a722d
commit
b95f0de6d7
1 changed files with 1 additions and 2 deletions
|
|
@ -29,8 +29,7 @@ class Article:
|
||||||
publish_date_time = soup.find("meta", property="article:published_time")[
|
publish_date_time = soup.find("meta", property="article:published_time")[
|
||||||
"content"
|
"content"
|
||||||
]
|
]
|
||||||
self.date = datetime.datetime.strptime(publish_date_time, "%Y-%m-%dT%H:%M:%SZ")
|
self.date = datetime.datetime.strptime(publish_date_time, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=ZoneInfo("UTC"))
|
||||||
self.date = self.date.replace(tzinfo=ZoneInfo("UTC"))
|
|
||||||
|
|
||||||
# Handle text
|
# Handle text
|
||||||
text = []
|
text = []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue