将 google 的结果写入 html 页

Write results of google to html pages

我想从 Internet 随机下载许多 Excel 文件(例如,.xls、.xlsx、.xlsm)。

首先,我 "google" 文件后缀为 .xlsx。我有以下 shell:

for  (( i=0 ; i<400 ; i=i+10 )) ; do
    wget -O $i.html "https://www.google.fr/?gws_rd=ssl#q=filetype:xlsx&start=$i"
done

上面的shell生成了0.html10.html...奇怪的是,所有生成的页面都是一样的:

有人知道我的代码有什么问题吗?

wget在这方面的潜力有点有限,你可以尝试使用,例如

lynx -dump "http://google.com/search?hl=en&safe=off&q=filetype:xlsx&start=$i" > output

但是,应该牢记 Google Terms of Service,尤其是:

Don’t misuse our Services. For example, don’t interfere with our Services or try to access them using a method other than the interface and the instructions that we provide.