in reply to How to write CSS selector to extract more than one value from html source using scrappy module?

CSS selectors cannot extract attributes.

You can try to extract the node and the child node in two passes. It seems that Scrappy uses Web::Scraper, so maybe learning about how to do things using Web::Scraper will help you.

I would guess that the ->focus method will allow you to select a node and its child nodes, and then you can select the link together with the img tag.

  • Comment on Re: How to write CSS selector to extract more than one value from html source using scrappy module?
  • Select or Download Code