1

I need to download a file sized around 1.6GB. I's like to get it download via a command line tool like axel, wget or curl

However, how can I download a file which needs to be logged in to the site before download?

Example:

I need to download a software from Apple developer site with this URL: https://developer.apple.com/downloads/index.action?name=Xcode#

It asks for login and after a successful login it shows another web page with the >>downloadable file list. Once I clicked on the specific download link: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg Download starts.

How to perform this task with axel or wget

1 Answer 1

0

This is how I authenticate on some sites with wget.

wget --user=username --ask-password url_here/file.bar

The --ask-password parameter asks you for a password. Be sure to replace username with your actual username and change the url according to your needs.

I think you cannot use wget to access the mentioned apple site.

2
  • have you tested it? pastebin.com/raw.php?i=xkLGbkky wget when I try it, doesn't like --ask-password it gives an error on it. And since his url is https he needs --noc-check-certificate, and even with that it only downloads a 3mb file probablt not what he wants.. that may be 'cos the username I used wasn't right but maybe more than that.. Maybe he needs to log into a webpage first then download that.. in which case wget and specifying a password wouldn't work anyway.
    – barlop
    Commented Apr 17, 2015 at 0:12
  • I have a suspicion that if wget can specify user/pass (and I think it can), then it'd only be for the kind of files where you get a dialog box in the browser.. like a popup.. I think i've done it before for files. But if you enter his URL into your browser, it goes to a webpage with some textboxes for a user/pass to be entered .. I don't think wget can do that. He needs to log into a website. not just a file that has a user/pass. I think maybe the wget specifying user/pass might be for something like apache protecting the file with a user/pass.. not for this webpage login thing.
    – barlop
    Commented Apr 17, 2015 at 0:14

You must log in to answer this question.

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