Google Maps Xpath using Google Spreadsheet IMPORTXML

拈花ヽ惹草 提交于 2019-12-25 10:31:48

问题


I am trying to use Pull data from google maps results using IMPORTXML function in google spreadsheet but I am getting error #N/A

=importxml(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,"//div[@class='name lname'])

or

=importxml(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,//SPAN[@class='pp-place-title'])

but nothing is working.. Any thoughts???

Thanks


回答1:


If you're going to give importxml literal strings as arguments, they need to be double-quoted:

=importxml("http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb", "//div[@class='name lname']")



来源:https://stackoverflow.com/questions/29313012/google-maps-xpath-using-google-spreadsheet-importxml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!