xpath does not give results

TLDR; execute response.selector.remove_namespaces() before running response.xpath()

It essentially means that you are removing xmlns="http://www.w3.org/2005/Atom" from response to write easier XPath. Alternative, you can register the namespace and change your selectors to include this namespace:

response.selector.register_namespace('n', 'http://www.w3.org/2005/Atom')
response.xpath('//n:entry')

You can read more details here.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top