Skip to content

Commit

Permalink
1.5.0_RC2 - fixing issue #30
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanbobrowski committed Nov 21, 2024
1 parent c91c046 commit 75b895b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blog2epub/crawlers/article_factory/blogspot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from datetime import datetime
from typing import Optional

from lxml.html.soupparser import fromstring
Expand All @@ -10,7 +11,7 @@ class BlogspotArticleFactory(DefaultArticleFactory):
def get_title(self) -> Optional[str]:
title = super().get_title()
date = self.get_date()
if title is None or self.blog_title is not None and title == self.blog_title and date is not None:
if isinstance(date, datetime) and (title is None or title == self.blog_title):
title = date.strftime("%A, %d %B %Y, %H:%M")
return title

Expand Down

0 comments on commit 75b895b

Please sign in to comment.