Skip to content

Instantly share code, notes, and snippets.

@podolskyi
Last active March 16, 2016 04:11
Show Gist options
  • Save podolskyi/0d9753f1a9fdf7cc6a76 to your computer and use it in GitHub Desktop.
Save podolskyi/0d9753f1a9fdf7cc6a76 to your computer and use it in GitHub Desktop.
Example XPath following, next tag
# Following next tag
response.xpath('//h2[contains(text(), "Contact information")]/following::table[1]//text()').extract()
# Tag contains
//person[contains(firstname, 'Kerr') and contains(lastname, 'och')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment