BeautifulSoup : why does "string" not give me the string?

  • Thread starter Gabriel Rossetti
  • Start date
G

Gabriel Rossetti

Hello everyone,

I am using BeautifulSoup to parse some HTML and I came across something
strange.
Here is an illustration:
u'hello \xe7a boume'

why does soup.find("div", "text").string not give me the string? Is it
because there is a <br/>? Is there a way to have it ignore the <br/>
tag? Am I doing something wrong?

Thank you,
Gabriel

PS
Sorry if this appears twice on the list, but I sent it 4 hours ago and
it never showed up so I resent it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top