Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'p:has(b)' returns incorrect value #166

Open
mmair2011 opened this issue Mar 20, 2017 · 1 comment
Open

'p:has(b)' returns incorrect value #166

mmair2011 opened this issue Mar 20, 2017 · 1 comment

Comments

@mmair2011
Copy link

mmair2011 commented Mar 20, 2017

It should return p tags without b tag.

>>> from pyquery import PyQuery as pq
>>> ahtml='''
<html>
<p>pa</p>
<p>pb<b>b1</b></p>
<p>pc<b>b2</b></p>
<p>pd</p>
<p>pe</p>
</html>
'''
>>> d=pq(ahtml)
>>> d('p:not(:has(b))')
[]
@ghost
Copy link

ghost commented Jul 30, 2017

Not ideal, but there's d('p').not_(':has(b)')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant