Issue #57 resolved

PyQuery .children() method wrong behavior

Anonymous created an issue

from pyquery import PyQuery as pq

html = """ <div> <a href="#">text1<img src="abc"/>text2</a> <a href="#">text3<img src="xyz"/>text4</a> </div> """

tree = pq(html)

for a in tree('a'): a = pq(a) print a.children()

Prints:

<img src="abc"/>text2

<img src="xyz"/>text4

Instead of:

text1<img src="abc"/>text2

text3<img src="xyz"/>text4