View Single Post
Old 08-09-2019, 06:09 AM   #20
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,746
Karma: 24032915
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Vroni View Post
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')
Doitsu is offline   Reply With Quote