scrapy / parsel

Parsel lets you extract data from XML/HTML documents using XPath or CSS selectors
BSD 3-Clause "New" or "Revised" License
1.12k stars 143 forks source link

[From Scrapy] Selector.extract_links and links #26

Open nramirezuy opened 8 years ago

nramirezuy commented 8 years ago

This was originally on Scrapy. Moving it to Parsel to continue discussion.

https://github.com/scrapy/scrapy/pull/331

nramirezuy commented 8 years ago

I think this can be implemented in two different methods one returning text and the other returning the actual Selector instances.

Gallaecio commented 5 years ago

What about this?

As for a version that returns Selector instances, what’s the use case? Maybe providing some predefined, importable XPath expressions (e.g. from parsel.xpath import URI_XPATH) would be a better approach.