python - How lxml with cssselect get text -



python - How lxml with cssselect get text -

example:

html='<div class="a"><input type="text" value="bla bla bla">some text</div>' import lxml.html doc = lxml.html.document_fromstring(html) a=doc.cssselect("div.a") print a[0].text

this print empty string... how "some text"?

python css-selectors lxml

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -