How to download a URL as a file?

189,451

Solution 1

On Linux, use 'wget' on the command line:

wget http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3

If you want a similar tool on Windows, you could install wget via Cygwin or use one of the GNU Win32 ports.

On Mac OS X, there's cURL, which appears to have a Windows build.

Solution 2

3. The command-line method

Download/install/build wget or similar and download from the commandline:

wget http://some/url

Solution 3

I use DownThemAll for this. You can just copy the link, open the manager window and select 'Add URL', assuming it doesn't pick the links up when run normally.

Solution 4

if you have the URLs ready and a vanilla Firefox, you can simply download URLs by pasting them in the download manager. I just tested this with FF v26 and it still works like that. btw jtbandes says, this works in Chrome too.

http://lifehacker.com/5915644/download-any-file-or-web-page-by-pasting-its-url-into-firefoxs-download-window

Solution 5

Here is a way to create a download page on the fly without leaving your browser.

  1. Navigate to the web page (which I'm guessing is http://www.cbc.ca/thesundayedition/ ?).
  2. Type this JavaScript into your address bar:

javascript:document.documentElement.innerHTML.match(/external_url=([^\"]*\.mp3)\"/);document.write('<'+'a href="'+RegExp.$1+'">download<'+'/a>')

Share:
189,451

Related videos on Youtube

Michelle
Author by

Michelle

Updated on September 17, 2022

Comments

  • Michelle
    Michelle almost 2 years

    A website URL has "hidden" some MP3 files by embedding them as Shockwave files, as follows.

    <span class="caption"><!-- Odeo player --><embed src="http://odeo.com/flash/audio_player_tiny_gray.swf"quality="high" name="audio_player_tiny_gray" align="middle" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars="valid_sample_rate=true external_url=http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></span>
    

    How can I download the files for off-line listening?

    I've found two methods:

    1. The Stack Overflow Method

    Create a new local HTML file with just the links, for example:

    <a href="http://podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3">Sunday Edition 25Nov2008</a>
    

    Open the file in the browser, right click the link and File > Save Link As.

    2. The Super User Method

    Install the Firefox addin Iget. (Be sure to use the right version for your Firefox version.)

    Tools > Downloads > Enter URL in the field.

    Are there any other ways?

    • hyperslug
      hyperslug almost 15 years
      You can skip creating a local file and just put "podcast.cbc.ca/mp3/sundayeditionstream_20081125_9524.mp3" in your address bar.
    • Ehtyar
      Ehtyar almost 15 years
      That would only work providing you didn't have any multimedia plugins active (VLC, WMP etc).
    • mk12
      mk12 over 14 years
      On safari, hold down option while clicking link.
    • Simon
      Simon over 11 years
      Shouldnt the title question read "Download a File as or given a URL ?"
    • George Birbilis
      George Birbilis over 7 years
      If it's a media file, then on Edge browser (Windows 10) you can right click on the default media player used and select to save the media file (was just trying with an .mp4 file). Maybe the default media players of other modern browsers have similar action at context menu.
  • Telemachus
    Telemachus almost 15 years
    Mac's don't have wget installed by default. It does have curl.
  • Michelle
    Michelle almost 15 years
    Nope, as Ehtyar pointed out, the plugins automatically start playing the mp3, with no apparent way to save the file.
  • Josh Hunt
    Josh Hunt almost 15 years
    It would start playing the song, but you should be able to choose Save As from the file menu. I definitely can.
  • Peter Mortensen
    Peter Mortensen almost 15 years
    There is also a stand-alone wget for Windows (Cygwin is not needed) - so wget can be used from BAT files. A direct download URL is: users.ugent.be/~bpuype/wget/wget.exe
  • Michelle
    Michelle almost 15 years
    I selected this as the most correct answer because it addresses multiple operating systems.
  • mk12
    mk12 over 14 years
    No, save as is greyed out. However, you can just hold down option, select the address bar and hit enter to download it instead of playing it.
  • Joseph Tayor
    Joseph Tayor over 12 years
    I think the question's intent was different - what if you're just started out with a URL?
  • Arjan
    Arjan over 12 years
    @Derek, the Media tab shows all URLs that are embedded in the page one is viewing. One only needs the page URL, not the URLs of all that is embedded, to see that list.
  • Nils
    Nils over 12 years
    What the hell??! I would not google this on Linux/Mac..
  • Vincent Vancalbergh
    Vincent Vancalbergh almost 12 years
    I'm repeating this here from a comment by Peter Morgensen down below: There is also a stand-alone wget for Windows (Cygwin is not needed) - so wget can be used from BAT files. A direct download URL is: users.ugent.be/~bpuype/wget/wget.exe
  • Rob
    Rob almost 12 years
    @VincentVancalbergh Perfect, I'll just wget that lin... well crap.
  • Vincent Vancalbergh
    Vincent Vancalbergh almost 12 years
    wgetception! o.O
  • Kevin Fegan
    Kevin Fegan about 8 years
    @VincentVancalbergh - It seems that that link for wget is no longer active. I found it on Wayback here: web.archive.org/web/20150303131028/http://users.ugent.be/… from 2015-0303. There are more recent captures for that page on Wayback, but they all show a "404 file not found" page was captured. Wget.exe at the page linked above is version 1.11.4, dated February 18 2010. This wget seems to be a port (or perhaps a mirror) of GNU wget. Perhaps a more recent version can be found here: gnu.org/software/wget/wget.html
  • Kevin Fegan
    Kevin Fegan about 8 years
    @PeterMortensen - It seems that that link for wget is no longer active. I found it on Wayback here: web.archive.org/web/20150303131028/http://users.ugent.be/… from 2015-0303. There are more recent captures for that page on Wayback, but they all show a "404 file not found" page was captured. Wget.exe at the page linked above is version 1.11.4, dated February 18 2010. This wget seems to be a port (or perhaps a mirror) of GNU wget. Perhaps a more recent version can be found here: gnu.org/software/wget/wget.html
  • David Balažic
    David Balažic over 5 years
    I just tried it and if failed. Apparently it has problems parsing non-ASCII or other chars. Probably the space character. Stupid browsers turn encoded chars to their actual char value when copying the URL, so my URL had spaces in it.