Hello,
I am using this Xpath to pull Google Local Pack results.
//div[1]/div[*]/div/div/a[2]
It mostly works great with a few exceptions
For example:
when using the formula:
=IF(M25="","",Dump(XPathOnUrl(R25,$AO$1,"href",HttpSettings(TRUE,,,"3000|6000|Host"),"text"),TRUE))
if $AO$1 is always:
//div[1]/div[*]/div/div/a[2]
and if M25 is, for example, any of these:
http://www.google.com/search?pws=0&gl=EN&q=Nashville Automobile Accidents Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Bicycle Accidents Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Bus Accidents Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Car Accidents Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Broken Bones Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Car Accidents On I 40 I 65 Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Driver Texting Distraction Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Facial Injuries Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville How to handle the aftermath of a car accident Lawyer&num=10
http://www.google.com/search?pws=0&gl=EN&q=Nashville Internal Injuries Lawyer&num=10
I get good result urls.
but sometimes I don't
http://www.google.com/search?pws=0&gl=EN&q=Nashville DUI Accidents Injuries Lawyer&num=10 generates 4 resutls versus the standard 3 map pack resutls. The odd result (intead of a normal url) is: /aclk?sa=l&ai=DChcSEwi1i6CzgqfVAhUMF4EKHR9GCeEYABAFGgJ5dw&sig=AOD64_0t0y0OuSRq9Xkv9JqRuupx9IKEOw&q=&ctype=99&ved=0ahUKEwigyZuzgqfVAhUJ4yYKHfOmDLsQhKwBCFI&adurl=
another example is:
http://www.google.com/search?pws=0&gl=EN&q=Nashville What is the difference between compensatory and punitive damages Lawyer&num=10
which generates:
/search?pws=0&gl=EN&tbm=bks&q=inauthor:%22Henry+Philip+Farnham%22&sa=X&ved=0ahUKEwiurpikg6fVAhVHOCYKHaicDrMQ9AgIRDAG
- 3 good urls
and another is:
http://www.google.com/search?pws=0&gl=EN&q=Nashville Nashville Personal Injury Office Lawyer&num=10
which generates:
/aclk?sa=l&ai=DChcSEwiQ8ZHAgqfVAhWRPIEKHWUDCH8YABAOGgJ5dw&sig=AOD64_07krbeJbY9Vqs8VfFXWRorQozbow&q=&ctype=99&ved=0ahUKEwjiko7AgqfVAhWFQSYKHQmCBmEQhKwBCFQ&adurl=
- 3 good urls.
any insight/ help on the proper xpath to generate ONLY the 3 normal pack results would be appreciated.
Thanks!
Chris