为什么wget忽略url中的查询字符串? [英] Why wget ignores query string in the url?

查看:562
本文介绍了为什么wget忽略url中的查询字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用wget下载以下18个html文件:

I want to use wget to download the following 18 html files:

http://www.ted.com/talks/quick-list?sort=date&order=desc&page=18  
http://www.ted.com/talks/quick-list?sort=date&order=desc&page=17  
...  
http://www.ted.com/talks/quick-list?sort=date&order=desc&page=1

无论 page = 之后是什么,它总是下载列表的第一页。我必须逃避网址中的一些字符吗?如何?

No matter what comes after page=, it always downloads the first page of the listing. Do I have to escape some characters in the urls? How?

推荐答案

& 是大多数shell环境中的特殊字符,你可以使用双引号引用URL来将整个事情作为参数传递给 wget

& is a special character in most shell environments, you can use double quotes to quote the URL to pass the whole thing in as the parameter to wget:

wget "http://www.ted.com/talks/quick-list?sort=date&order=desc&page=18"

这篇关于为什么wget忽略url中的查询字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆