Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix ValueError: Invalid XPath: //div/[id="not-exists"]/text() on sele…
…ctors.rst >>> response.xpath('//div/[id="not-exists"]/text()').extract_first() is None Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/vagrant/.virtualenvs/scrapy/lib/python2.7/site-packages/scrapy/http/response/text.py", line 109, in xpath return self.selector.xpath(query) File "/home/vagrant/.virtualenvs/scrapy/lib/python2.7/site-packages/scrapy/selector/unified.py", line 100, in xpath raise ValueError(msg if six.PY3 else msg.encode("unicode_escape")) ValueError: Invalid XPath: //div/[id="not-exists"]/text()
- Loading branch information