0
votes

I am trying to return the first URL from Google through Google Sheets ImportXML function. I have copied the XPath from the element from a Google search and have this formula:

index(ImportXML("http://www.google.co.uk/search?q="&A2&"+"&B2&"+"&C2&"+"&D2,"//*[@id="rso"]/div/div/div[1]/div/div/div/div[1]/cite"),1) 

The fields I want it to search are in A2, B2, C2 and D2 but for some reason it is not returning any results and is stuck on "Loading...".

Does anyone have any idea what I am doing wrong?

1

1 Answers

0
votes

In the past simply the xpath //cite worked, but specifically , google does their best to block it, however on occasion you might get lucky and return some info - but its really inconsistent, so basically for the most part its not currently possible.