Closed lufeihaidao closed 8 years ago
Works for me:
Python 3.5.1 (default, Jan 7 2016, 16:14:40)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyquery import PyQuery
>>> d = PyQuery('<p class="hello">Hi there</p><p>Bye</p><br />')
>>> d('p').map(lambda i, e: PyQuery(e).text())
['Hi there', 'Bye']
>>>
Oh sorry maybe it's my fault. I cannot understand why I get different results from the same code ...
Try to report exact versions of python, pyquery and lxml
I got this error when I try to copy https://pythonhosted.org/pyquery/_modules/pyquery/pyquery.html#PyQuery.map example