I would like to download Google Trends csv data using wget, but I'm unfamiliar with using wget. An example URL is:
Opening this with a web browser, I retrieve the expected file. To do this with wget, I tried the following command:
wget "http://www.google.com/insights/search/overviewReport?cat=71&geo=US&q=apple&date&cmpt=q&content=1&export=1" -O report.csv
which results in the following:
<html><head><title>Redirecting</title>
<meta http-equiv="refresh" content="0; url='http://www.google.com/insights/search#content=1&amp;cat=71&amp;geo=US&amp;q=apple&amp;date&amp;cmpt=q&#39;"></head>
<body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#551a8b" alink="#ff0000"><script type="text/javascript" language="javascript">
location.replace("http://www.google.com/insights/search#content\x3d1\x26cat\x3d71\x26geo\x3dUS\x26q\x3dapple\x26date\x26cmpt\x3dq")
</script></body></html>
My first guess is that wget
doesn't have access to cookies with proper authentication.
Anybody?