How to download anything online: webpages, images, videos
As the internet has developed, almost everything is easily available online, be that a news report, a video or a song. However, when you go offline, or somewhere with no internet connection and you want to access the same video or songs, then it may be necessary to download it before hand. In this article we will explain how to download almost anything online.
How to download a webpage?
The methods for downloading a webpage will depend on the browser that you are using, in this section we will focus on Chrome, Mozilla Firefox and Safari.
Chrome
On Chrome you can save a webpage and the other elements that are on it. All you have to do is right-click on any given page, and then you can choose to Save as. Save the webpage in the following save type: Web Page, Complete. This will download the text and images, however it won't download videos.
Mozilla Firefox
The method is very similar for Firefox. All you need to do is right-click on the web page you're on and the select Save Page As from the menu. You can give the page a name and then specify a location to save the page. You will want to have Web Page, Complete as the save type again. This will save the webpage, expect for videos or audio.
For Safari users, when you are on the webpage you wish to download, go into the menu at the top of the screen. Select File and then Save As (or the shortcut: command+S). This will then create a copy of the webpage, including adverts and JavaScript. The only noticeably difference when you access the page offline will be the absence of embedded media.
How to save images from a webpage?
The above steps allow you to download almost everything from a given site. If you only want to download or save a specific image without downloading the rest of the page it is simple. Right-click on the image you want to save, and then "Save image to "downloads" in Safari or "Save image as..." in Chrome and Firefox. If this method doesn't work, because access to the image is restricted, you can disable JavaScript.
Chrome
- In Chrome, open the webpage with the image you want to download.
- To the left of the URL, there should be a padlock symbol. Select this.
- Click "Site Settings" and select "JavaScript".
- Then block JavaScript by selecting the Block button.
- Reload the webpage and then try to right-click and save the image again.
If this doesn't work and the quality of the image is not overly important then you can always just print screen the image. The image won't be as clear as it would be if you could download it, but you will be able to capture a record of the image.
How to download videos from a website?
This is slightly more complicated than saving an image or the website itself. You will need to copy the URL of the video that you want to download. For example, the video is being hosted on YouTube.
- You will need to access the YouTube video, and then copy the URL of that video. You can do this by copying the URL at the top of the page, or from going into Share > Copy Link > Copy URL.
- Once you have copied the URL go to a website such as: https://keepv.id/ (A YouTube video / MP3 / MP4 converter).
- Paste the URL into the text field, and then select Go / Download / Convert (depending on the website).
- You should then be able to download the video.
Another option would be to do a screen grab, or a video recording of your screen to capture a video. The only problem with this is that no sound will be captured, and the quality of the video will not be that high.
For more information, we have a dedicated article on how to download videos from a website using a tool. This will show you how you can use different tools to download videos from websites.
How to download a webpage with code?
- Using wget (Command-Line Tool):
If you prefer a command-line approach, you can use a tool like wget. Open your terminal or command prompt and enter a command like this:
wget -p -k http://example.com
This command will recursively download the webpage along with its assets (images, stylesheets, etc.) and convert the links to be local.
- Using Python (with libraries like Requests and Beautiful Soup):
If you have programming knowledge, you can write a Python script to download a webpage. The Requests library can be used to fetch the HTML content, and Beautiful Soup can be used for parsing and saving the webpage content. Here's a basic example:
import requests from bs4 import BeautifulSoup url = 'http://example.com' response = requests.get(url) if response.status_code == 200: soup = BeautifulSoup(response.content, 'html.parser') with open('webpage.html', 'w', encoding='utf-8') as file: file.write(soup.prettify())