In the python library pyquery
, the query result is a <class 'pyquery.pyquery.PyQuery'>
object, not a dictionary or an array. So how to get the query result count of result
in this example?
dom = '<p><span><em>Whoah!</em></span></p><p><em> there</em></p>'
pq = PyQuery(m)
result = pq('p').find('em') #p = "[<em>, <em>]"