felipecsl / wombat

Lightweight Ruby web crawler/scraper with an elegant DSL which extracts structured data from pages.
https://felipecsl.github.io/wombat/
MIT License
1.31k stars 129 forks source link

How to get image src link #56

Closed devmtnaing closed 8 years ago

devmtnaing commented 8 years ago

is there a way to retrieve src or data tags rather than the inner-text

Thanks.

felipecsl commented 8 years ago

yes, just use xpath, for example `"xpath=/*/book[1]/title/@lang". More details: http://stackoverflow.com/questions/4531995/getting-attribute-using-xpath

devmtnaing commented 8 years ago

Thanks! appreciate it.