Skip to content

Commit

Permalink
Added if statements to skip if title is None and extract text is Tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
zGadli committed Apr 6, 2024
1 parent 25206b3 commit 2cd1a95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lncrawl/core/novel_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ def _combine_results(results: List[SearchResult]) -> List[CombinedSearchResult]:
for item in results:

if item.title is None:
logger.warn(f'Title is type None in {item}')
continue
elif isinstance(item.title, Tag):
logger.warn(f'Title is type Tag in {item}')
item.title = item.title.get_text()

key = slugify(item.title)
Expand Down

0 comments on commit 2cd1a95

Please sign in to comment.