Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > google search in multiple sites

Reply
Thread Tools

google search in multiple sites

 
 
kans
Guest
Posts: n/a
 
      05-12-2005
Hi,

I would like to search for a particular key word in multiple sites
frequently. For example, if I want to search for "slide show" in the
following sites, how do I do that? Is there some script I can use?

www.nytimes.com
www.cnn.com
news.bbc.co.uk
www.washingtonpost.com
www.latimes.com
www.boston.com/news/globe/
www.sfgate.com

Thanks for your help.

Kannan

 
Reply With Quote
 
 
 
 
mahurshi@gmail.com
Guest
Posts: n/a
 
      05-12-2005
here's something that will do a part of what you want to do.

#!usr/local/bin/perl -w

# change the code below to loop through different files

$filename = "placeyourinputfilenamehere.ext";

open (INFILE, $filename);

@array = <INFILE>;

foreach $line (@array) {
if ($line =~ /slide show/) {
print "Found in file $filename\n";
}
}

 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      05-12-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> here's something that will do a part of what you want to do.
>
> #!usr/local/bin/perl -w
>
> # change the code below to loop through different files
>
> $filename = "placeyourinputfilenamehere.ext";
>
> open (INFILE, $filename);
>
> @array = <INFILE>;
>
> foreach $line (@array) {
> if ($line =~ /slide show/) {
> print "Found in file $filename\n";
> }
> }
>


What does looking for 'slide show' in a local file have to do with the
subject of "google search in multiple sites"?

 
Reply With Quote
 
J. Gleixner
Guest
Posts: n/a
 
      05-12-2005
kans wrote:
> Hi,
>
> I would like to search for a particular key word in multiple sites
> frequently. For example, if I want to search for "slide show" in the
> following sites, how do I do that? Is there some script I can use?
>
> www.nytimes.com
> www.cnn.com
> news.bbc.co.uk
> www.washingtonpost.com
> www.latimes.com
> www.boston.com/news/globe/
> www.sfgate.com


What have you tried?

There are quite a few Google related modules on CPAN that will help you
use Google's results without having to do any page scraping.

http://search.cpan.org/search?query=google&mode=all
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can get to Google and search but can't open any of the sites liste =?Utf-8?B?UkNC?= Wireless Networking 1 11-30-2006 01:51 AM
Search multiple job sites for you! FindJobEasy.com VOIP 0 06-24-2005 04:04 AM
Search multiple job sites for you! FindJobEasy.com Cisco 0 06-24-2005 04:03 AM
Firefox google search bar searches google.de Abso Firefox 3 01-06-2005 10:55 PM
Can search find index Multiple sites on one server Paul Briggs HTML 1 02-21-2004 05:29 AM



Advertisments