Skip Menu |

This queue is for tickets about the WWW-Search-Scrape CPAN distribution.

Report information
The Basics
Id: 74009
Status: new
Priority: 0/
Queue: WWW-Search-Scrape

People
Owner: Nobody in particular
Requestors: stefan [...] berger.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Google doesn't report Number of Results anymore
Date: Sun, 15 Jan 2012 10:45:16 +0100
To: bug-WWW-Search-Scrape [...] rt.cpan.org
From: Stefan Berger <stefan [...] berger.net>
Hi it seems that Gpogle changed its result page. The Module WWW::Search::Scrape doesn't return the number of results anymore. With two small changes it can be brougt back to work: old: my $mech = WWW::Mechanize->new('agent' => 'NotWannaTellYou', 'cookie_jar' => {}); new: my $mech = WWW::Mechanize->new('agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0.1) Gecko/20100101 Firefox/9.0.1', 'cookie_jar' => {}); With the browser 'NotWannaTellYou' Google doesn't put the result in the div class 'resultStats'. or any other userful class name, so it is very hard to find. Maybe any other modern browser Identification will work. and old: @res = $tree->findvalues('//li[@class="g"]/h3/a/@href'); new: @res = $tree->findvalues('//li[@class="g"]/div/h3/a/@href'); With the new browseridentification Google include an additional div That's it. Would be nice to see it in the next version working. Kind regards Stefan -- ------------------------------------------------------------ Stefan Berger + Monica Moran Wiesenweg 11 4144 Arlesheim Tel +41 061 311 50 73 Skype s1738berger http://www.monica-stefan.ch ------------------------------------------------------------