Skip to content

Commit

Permalink
Convert bs4.element.NavigableString to str
Browse files Browse the repository at this point in the history
  • Loading branch information
GjjvdBurg committed Mar 27, 2021
1 parent d693199 commit c244e86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readabilipy/simple_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def extract_text_blocks_js(paragraph_html):
# Load article as DOM
soup = BeautifulSoup(paragraph_html, 'html.parser')
# Select all text blocks
text_blocks = [{"text": s} for s in soup.find_all(string=True)]
text_blocks = [{"text": str(s)} for s in soup.find_all(string=True)]
return text_blocks


Expand Down

0 comments on commit c244e86

Please sign in to comment.