question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.text is empty on Soup creation

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jeffsieucommented, Oct 11, 2020

Hi, can I have a go at this?

0reactions
maxhumbercommented, Oct 12, 2020

Fixed by #29

Read more comments on GitHub >

github_iconTop Results From Across the Web

Beautiful Soup returns an empty string when website has text
This shows you how the li element html is constructed through javascript running on the page with parkfac[i] returning the text description in ......
Read more >
Soup - Wikipedia
Soup is a primarily liquid food, generally served warm or hot that is made by combining ingredients of meat or vegetables with stock,...
Read more >
Empty Kettle of Stone Soup - Item - World of Warcraft - Wowhead
It is crafted. In the Food & Drinks category. An item from World of Warcraft: Shadowlands. Always up to date with the latest...
Read more >
Empty Bowls - Columbus, Indiana - Home | Facebook
Join us for the 24th annual Empty Bowls - Columbus, IN fundraiser to benefit local food pantries and shelters. This year's event will...
Read more >
Flask by Example – Text Processing with Requests ...
Flask by Example – Text Processing with Requests, BeautifulSoup, and NLTK ... Next, we created a dictionary with the words (as keys) and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found