requrie "web_binder"
class YahooNews < WebBinder
sources "http://www.yahoo.co.jp/news"
download_directory ""
clear_before_downloading
download_before_scraping
scrape :links do |doc|
doc.search("//a").map do |a|
{ a.inner_text => URI.join("http://www.yahoo.co.jp/news", a[:href]).to_s }
end
end
end
YahooNews.links
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request