Skip to content

Commit

Permalink
Minor fix for Null titles on blog.gtf.org.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdanbobrowski committed Dec 2, 2024
1 parent 753cd8f commit 06d27b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blog2epub/crawlers/article_factory/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def get_title(self) -> Optional[str]:
for title_pattern in self.patterns.title:
if title_pattern.xpath is not None:
title = self.tree.xpath(title_pattern.xpath)
if isinstance(title, list):
title = title[0]
if len(title) > 1:
break
if title is None:
Expand Down

0 comments on commit 06d27b4

Please sign in to comment.