Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to download this webpage using wget in Win7 : http://www.att.com/shop/wireless/devices/smartphones.deviceListView.xhr.flowtype-NEW.deviceGroupType-Cellphone.paymentType-postpaid.packageType-undefined.html?commitmentTerm=24&taxoStyle=SMARTPHONES&showMoreListSize=1000

I am using this command to do this :

wget -E -H -k -K -p -e robots=off -P /Downloads/AT&T_2013-01-29/ http://www.att.com/shop/wireless/devices/smartphones.deviceListView.xhr.flowtype-NEW.deviceGroupType-Cellphone.paymentType-postpaid.packageType-undefined.html?commitmentTerm=24&taxoStyle=SMARTPHONES&showMoreListSize=1000

I am getting taxostyle not defined, commitmentterm not defined or recognizble method error

share|improve this question
up vote 0 down vote accepted

You have two ampersands ( & ) and question mark in your URL.

I am not sure how your windows shell handles that, it probably depends on what you are using. (Cmd.exe? Powershell, Hamilton C-shell for windows, cygwin-bash?)

Regardless, many of those will try to parse those and you will end up with wget getting a different result than you expect. You would either need to escape those chars (how depends on the shell), or use " marks.

If I use wget -E -H -k -K -p -e robots=off "http://www.att.com/shop/wireless/devices/smartphones.deviceListView.xhr.flowtype-NEW.deviceGroupType-Cellphone.paymentType-postpaid.packageType-undefined.html?commitmentTerm=24&taxoStyle=SMARTPHONES&showMoreListSize=1000" in bash3 shell on BSD (notice the added quotes around the download URL) then the command does seem to work. (It downloads 3 directories, 2.ecom.attccc.com, 3.ecom.attccc.com and www.att.com)


As alternative you can put your URL in a FILE as it is (one in a line) and pass additional -i FILE parameter to wget instead of URL itself. Another case to check what is really passed to wget by your command is echo it, like this echo HERE_IS_URL and if output is acceptable, you can replase echo with wget or pipe it forward with | wget -i-.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .