importxml in google docs and returning a google search result

两盒软妹~` 提交于 2019-12-12 05:39:27

问题


I am trying to upload a result of a google search into my google docs using importxml and the code that used to work doesn't anymore. I have =IMPORTXML("https://www.google.com/search?q=site: [query]&num=100&start=1","//cite")

My error message is Could not fetch url: https://www.google.com/search?q=site:[query]&num=100&start=1

Can someone tell me why this doesn't work anymore?


回答1:


Google has lately been blocking search requests made from both Apps Scripts and Google Sheets though the requests are made from one of their own IPs. They probably do this to prevent scraping.



来源:https://stackoverflow.com/questions/37547985/importxml-in-google-docs-and-returning-a-google-search-result

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