How to download protected media content from websites
- Category: Linux Articles
- Published on Friday, 18 April 2014 20:20
- Written by Administrator
- Hits: 538
There are occasions when one wants to download media content such as movies from a website which only allows the media content to be viewed online on your browser. Programs such as Downloadhelper come to our rescue to download such content. However, if the file size is large, and the Internet connection is slow, invariably one ends up with partial content. Thereafter , when one retries to download the content from the website the downloader programs starts from the beginning and not from the place it had last stopped at. However a small command line Linux utility called 'wget' comes to our rescue. Wget is available for both Linux and Windows platform.
Broadly the steps involved are :
1. Download and install Mozilla Firefox.
2. Install the add-on extension DownloadHelper for Mozilla Firefox.
3. Install Adobe Flash Player plugin for Mozilla Firefox
4. Start downloading the content being streamed to your browser and capture the URL from the live download.
5. Download the media using wget from the command line.
I have taken a Windows 7 platform to demonstrate the procedure. To start with lets download Mozilla Firefox . Though these steps are quite trivial , yet I have given them out here for ease of understanding. Go to the link shown.
Download the Mozilla Firefox installer.
Run the Firefox installer.
This would download the complete software and then start the installation process.
The steps for installing are shown.
To install the add-on go to the Firefox tab on top left and click Add-on.
Now search for Downloadhelper as shown
Select Video Download Helper add-on.
You would require to restart Mozilla Firefox for Download Helper to start capturing the media links on a web page being viewed.
Now browse to your favorite media site.
On selecting to play the desired movie , the browser may tell you that you need to install Adobe Flash Player incase you don't have the same.
The following steps can be skipped if your browser has got Adobe Flash Player and it does not give you the above message. Installing Adobe Flash Player
Follow the steps as shown.
Un-check the optional offer.
Note the difference , the message regarding Adobe Flash Player is not displayed now.
Play the content you wish to download for it to be captured by the downloader. Notice the icon (three circle) of Download Helper change from black and white to a colurful rotating icon.
Click the icon of Download Helper. The file being streamed would be shown. Click the file name having an extension .flv .
A download window would appear. Now save the file at any suitable location. We are not interested in this file, rather we want to extract the link from the live download which would start after we press save.
Right Click and copy the download link.
Now that we have the download link, close the tab in which the movie is being streamed and also cancel the above download. This is required to save bandwidth and Internet data download usage.
To start with, you would require to download wget for your platform . Download wget for Windows from here and save it a folder. Now go to the folder where you have saved the executable file wget.exe and give the following command.
wget -c 'copied_link_from_earlier_step' -O outputFileName.flv
You should type wget -c and the right click and paste the link as shown.
add the switch -O and the desired file name after the link .
Now press enter and the download would start. To check the functionality, press Ctrl+C , this would disconnect the socket and stop downloading. This is what happens when your Internet connection trips due to some reason.
Now using the up arrow , give the same command again. Note, after the HTTP Response 206, we have Partial Content being displayed. This indicates that wget has taken into account the earlier partial download of media file and not started from the beginning , rather it starts from where it had left earlier. The same can be easily verified from screen shot.
I have not downloaded the complete file for the demo. However, the partial file can also be played to verify the media downloaded. Note that, the only catch in the above procedure is that the link is valid for a limited time. Therefore, if due to some reason the above download using wget gets interrupted, you must restart it by giving the same command as shown above, to restart the download. The progress of the download is shown on the left. Once you reach 100%, sit back and enjoy the movie.