views:

28

answers:

1

I am trying to search within Google Cache, so I need to fire this query:

http://webcache.googleusercontent.com/search?q=cache:news.ycombinator.com/news+hacker+news

And get some content like timestamp from the page. But when I do this using curl (ruby), it gives a permission denied error, i.e. scraping is blocked and that was expected.

So, is there any way to search google cache (either an API or some kind of workaround scraping) and extract some information like timestamp?

A: 

I didn't get any API bit I can scrape it using hpricot or nokogiri in rails (curl in Rails gives permission denied error). I will put up the code once I figure out how to extract the time stamp from the above URL using these gems.

Any one has a better solution?

zengr