Hello

I'm using Beautiful Soup to scrape a site (that's in Spanish) I 
sometimes come across strings like:
'Ner\\xf3n como cantor'

Which gets printed:
Ner\xf3n como cantor

When they should be:
NerĂ³n como cantor

I don't know if it is my fault (due to me misusing BS) or is it a BS 
fault. Anyway, is there a way to print the string correctly?

This is the code I'm using in BS

a = open("zona.htm")
text = a.readlines()
a.close()

BS = BeautifulSoup.BeautifulSoup(str(text))

for ed in BS('span', {'class':'ed_ant_fecha'}):
    urlynombre = ed.findNextSibling().findNextSibling().findNextSibling()
    nombre = urlynombre.next.next

And "nombre" is that string I mentioned.

Any help is appreciated, thanks
Ismael
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to