Tag: google trends

从Google趋势下载.csv文件

我希望从我通过代码创建的url下载Google趋势数据。 当这些URL放入浏览器(我使用firefox)时会显示一个保存提示,我可以选择在查看浏览器时打开或保存文件。 但是,我希望通过代码包含Google趋势数据的相同.csv文件,我被困住了。 这是我的代码创建的链接之一:[提示下载,但是是谷歌] https://www.google.com/trends/trendsReport?hl=en-US&q=debt&geo=US&date=now%207-d&cmpt=q&content=1&export=1 我有这个链接的两个问题,它要么下载带有中文字符的.csv文件(我相信已损坏?),要么下载一些HTML(如下所示)。 当HTML保存为HTML文件并运行时,它会将我带到Google趋势主页,其中包含看似无用的URL: https://www.google.com/trends/#geo=US&date=now+7-d&cmpt=q&q=debt&hl=en-US&content=1 Redirecting // Accessing window.external members can cause IE to throw exceptions. // Any code that acesses window.external members must be try/catch wrapped /** @preserveTry */ try { if (top == self) { if (window.gtbExternal) { window.gtbExternal.setM(); } else { window.external.setM(); } } } catch(err) { } location.replace(“http://www.google.com/trends#geo\x3dUS\x26date\x3dnow+7-d\x26cmpt\x3dq\x26q\x3ddebt\x26hl\x3den-US\x26content\x3d1”) […]