serp-spider / search-engine-google

:spider: Google client for SERPS
https://serp-spider.github.io
Other
167 stars 61 forks source link

localPack not parsing correctly #113

Closed Human018 closed 5 years ago

Human018 commented 5 years ago

Whenever I've performed a search which returns local listing (map listings) the Map parser always returns the first local listing url for all three listings.

The issue seems to be in /serps/search-engine-google/src/Parser/Evaluated/Rule/Natural/Map.php file, line 62.

$nodes = $dom->cssQuery('a.L48Cpd');

It is missing the $localPack variable to narrow the href search to the current array index, from what I see (and my tests) this line should be:

$nodes = $dom->cssQuery('a.L48Cpd', $localPack);
gsouf commented 5 years ago

Hi @Human018

Thanks for reporting and sorry for the delay. That's a good catch! You'll find it fixed in version 0.4.5