dannoura has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm using WWW::Search with the backend WWW::Search::PubMed to try and search this site. The problem is that I get absolutely nothing when I run this:
#! c:\perl\bin use WWW::Search; $query = "lung cancer treatment"; $search = new WWW::Search('PubMed'); $search->native_query(WWW::Search::escape_query($query)); $search->maximum_to_retrieve(100); while (my $result = $search->next_result()) { $url = $result->url; $title = $result->title; $desc = $result->description; print "$result\n"; print "<a href=$url>$title<br>$desc<p>\n"; }
I know that the WWW::Search module recognizes the search engine because I checked out the content of $engine. This is a tough one because there's no error I can look into. The script runs but retrieves no data. When I do the search manually by going to the page I do get results.
Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with search module
by Lachesis (Friar) on Jul 02, 2003 at 10:46 UTC | |
by dannoura (Pilgrim) on Jul 03, 2003 at 01:47 UTC | |
by Lachesis (Friar) on Jul 03, 2003 at 08:18 UTC |