我有一个 Excel VB 宏,可以自动从 Google Insights 下载 CSV 文件,它工作正常,下载 CSV 文件的代码是:
OutputFile = "http://google.com/insights/search/overviewReport?q=" _ & termsAndTickers(counter, 1) & "&cmpt=q&content=1&export=2"
但是,在 Google 从 Google Insights 切换到 Google Trends 后,上面的代码就停止工作了。我已将“见解”更改为“趋势”,但这没有帮助。
我还在 Google 趋势源代码中搜索,但找不到导出链接。有可用的 API 吗?有人有同样的问题吗?
最佳答案
试试这个:
OutputFile = "http://www.google.com/trends/trendsReport?hl=en-US&q=" & searchTerms & "&content=1&export=1"
其中 searchTerms 是空格编码的字符串,例如:pacquiao%20marquez
关于api - Google 从 Google Insights 切换到 Google Trends 后,Excel VBA 宏停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13695172/