by pmorici · 13y ago · 0 comments
I had the opposite experience though I used it only "for small jobs".
If there are no Content-Type (either in http headers or meta http-equiv) that specifies character encoding, no meta charset, and no xml declaration for xhtml, etc that is if the only way to find out character encoding is to guess then even in this case BeautifulSoup includes UnicodeDammit that uses chardet to guess the encoding.
It doesn't get any simpler than this IMO http://pastebin.com/hacxmAjV
http://www.crummy.com/software/BeautifulSoup/bs4/doc/#specif...
waiter there's some lxml in my soup!