gevent-spider icon indicating copy to clipboard operation
gevent-spider copied to clipboard

Fixed lxml/cssselect crash while parsing html.

Open tb0hdan opened this issue 11 years ago • 0 comments

File "lxml.etree.pyx", line 2969, in lxml.etree.fromstring (src/lxml/lxml.etree.c:61978) File "parser.pxi", line 1585, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:91455) ValueError: Unicode strings with encoding declaration are not supported. (<ThreadPool at 0x10d6daf50 0/1/4>, <function fromstring at 0x10d695b18>) failed with ValueError

for link in html.cssselect('a'): AttributeError: 'NoneType' object has no attribute 'cssselect' <Greenlet at 0x10d7c0550: spider(<gevent_spider.web.Client object at 0x10d61ea50>, u'http://url.com, (u'url.com',), <Pool at 0x10d61ed50 set([<Greenlet at 0x10d7c0410, <ThreadPool at 0x10d61ee10 0/1/4>, set([u'http://url.com/', u'http://url)> failed with AttributeError

tb0hdan avatar May 13 '13 16:05 tb0hdan