gazpacho: .text is empty on Soup creation

Describe the bug

When I create a soup object…

To Reproduce

Calling .text returns an empty string:

from gazpacho import Soup

html = """<p>&pound;682m</p>"""

soup = Soup(html)
print(soup.text)
''

Expected behavior

Should output:

print(soup.text)
'£682m'

Environment:

  • OS: macOS
  • Version: 1.1

Additional context

Inspired by this S/O question

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Hi, can I have a go at this?