简体   繁体   中英

wget wont download actual files

I've looked around for quite a while now and haven't figured out how to sort this out.

I'm trying to download files from a website, but only ever get an 'index.html' returned. This is useless to me, as I need the actual files. I've been using commands like

wget --no-check-certificate -nc -nH -r -k -p -np  --cut-dirs=3 \https://websitename/directory/folder_of_interest/

(I have my username and password set up in the .wgetrc file). The above code will return the recursive directories and in the final one will just be the index.html file.

I could really use a hand here.

In your question you have

wget \https://websitename/directory/folder_of_interest

This originally might have been

wget \
  https://websitename/directory/folder_of_interest

which is correct because the backslash is escaping the newline, but with your example is it incorrectly escaping the h . Remove the backslash or move the URL to the next line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM