From: Jason Stewart Date: 2009-08-19T06:01:36+09:00 Subject: Re: Q re nokogiri - searching Google and counting web pages with specific text On Tue, Aug 18, 2009 at 3:31 PM, Philip Rhoades wrote: > Eric, > > > On 2009-08-19 04:22, Eric Hodel wrote: >> >> On Aug 18, 2009, at 10:26, Philip Rhoades wrote: >>> >>> I think using nokogiri with Ruby should be able to do what I want but >>> I'm not sure how to do it - I want to search Google and list or count >>> the number of web pages from a particular domain: >>> >>> http://www.unitednations.org >>> >>> that contain specific text eg "george harrison" or "oxfam" etc. >>> >>> Could someone get me started? >> >> Why don't you use the google search API? > > > Seems like a good idea but I have hassles installing the dependency > ruby-SOAP4R rpm . . > The google search API does not use SOAP anymore, that's been deprecated for a while. You can use this: http://github.com/visionmedia/google-search/tree/master Or just use httparty or open-uri and parse the json that's returned from the new search API. Cheers, Jason