The same author has released Tie::Google a module to use tied hashes to fetch Google queries.#!/usr/bin/perl # Notice. No warnings. Sigh! use strict; use DBI; my $query = "@ARGV" || "PerlMonks"; my $sql = qq{ SELECT title, URL FROM google WHERE q = "$query" }; my $dbh = DBI->connect("dbi:google:", (glob "~/.googlekey"), undef, {RaiseError=>1, lr=>['en'], oe=>'utf-8', ie=>'utf-8'}); for (@{$dbh->selectall_arrayref($sql)}) { print "Title ", $_->[0], "\n", "URL ", $_->[1], "\n\n"; } $dbh->disconnect();
_ _ _ _ (_|| | |(_|>< _|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Google as database source
by jryan (Vicar) on Feb 19, 2003 at 16:19 UTC | |
by Aristotle (Chancellor) on Feb 19, 2003 at 22:00 UTC | |
by gmax (Abbot) on Feb 19, 2003 at 23:39 UTC | |
|
Re: Google as database source
by gmpassos (Priest) on Mar 17, 2003 at 06:23 UTC |