Quote:
Originally Posted by Vroni
So whats wrong with if not dc_language: ?
|
Both my
bs4 + lxml suggestion and DiapDealers
bs4 + LXMLTreeBuilderForXML code snippets work as designed.
If they don't work on your machine, please post your code.
I haven't tested DiapDealer's latest bs4 + lxml-xml suggestion, but, IIRC, if you're using the lxml-xml parser, you'll have to omit the dc: namespace prefix when using bs4 find:
Code:
dc_language = metadata_soup.find('language')