How to Download Images from URL ListMonday, June 21, 2021
Technological advancements have taken the world by storm – everything that was once a part of our imagination is now a reality. The internet is decked with everything one may need, from the influx of information and data to videos and images. However, as the amount of data available online is magnanimous; hence, extracting and downloading this data can be a tedious process. Businesses need data in terms of information, numerals, images, etc. – almost daily.
Visuals in terms of images have gained popularity in this tech-driven world; it tends to elevate the overall look and aesthetics of anything instantly. We are fully aware that numerous data extracting tools and software available make the work a lot easier, cheaper, and quicker for both big and small businesses. However, the question at hand is whether there is a tool, software, or any method in which the tedious process of downloading images from the URL list can also be made more accessible, cheaper, and quicker? Well, let us take this opportunity to tell you all there most certainly is a way in which you can download a massive amount of images easily from the URL list. Yes, you read that, right! The process is more or less similar to the data extraction method with slight changes here and there. So let us dive in and find out how to do this, keep on reading.
Table of Contents
What do you need for downloading images from the URL list?
To execute the process of downloading the images from the URL, there are two things that you need. First, you need a web scraping tool; we would suggest our favorite Octoparse as it is a coding-free visual web scraping tool. Second, TabSave, a Chrome plugin, helps you save the images immediately when you provide the URLs list.
It would be best if you remembered that not all images are created equally, meaning some of them can be fetched from the webpage directly. In contrast, some other images can be downloaded only via clicking on the respective thumbnails.
How to use Octoparse to extract URLs of the selected images?
First, let us find out how to fetch an image directly from a webpage. For example, if you wish to scrape images of a sunset from Pexel.com. You will access the website and type "sunsets" in the search bar on pexels.com, which would open the page displaying various images of sunsets. Now you would:
- Click “+Task” to initiate a new task under the Advanced Mode.
- Insert the URL of the selected webpage in the text box.
- Click on "Save URL."
The first part of the process is done, now you shall arrive on another page. We need to tell the bot which images it needs to fetch. So,
- Click on the first image. The “Action Tip” will now read, “Image selected, 100 similar images found” – this means we are on the right track.
- Go to Select and choose "Select All".
- Next, "Extract image URL in the loop".
Since we want the images from multiple pages and not just one singular page, so, to get the images from all the pages – scroll down to the bottom of the current page and click on "next page". To scrape the images from multiple carriers, it is only natural that we would have to click on "next page" numerous times, but we can select "Loop click the selected link" from "Action Tips".
Before running your web scraper/crawler, you need to be sure of one last thing if the HTML source code refreshes when you scroll down or if the webpage is not fully scrolled down, the corresponding image URLs will not be downloaded. This is one of the primary reasons why we are inclined towards Octoparse as it quickly auto scrolls. Please make sure you add auto scroll when you access the website for the first time and then again when it paginates. To do this, you need to:
- "Go to Webpage" from the workflow. There are "Advanced options" on the right-hand side of the workflow.
- Check "Scroll down to the bottom of the page when finished loading.
You can even customize the number of times you wish to scroll and what should be its pace. Octoparse allows you to scroll down a singular screen 40 times within a second between each scroll. Check the setting that works best for you; you might need to alter it accordingly. Once you are satisfied with the setting, apply it to the pagination step as well. Click on "Click to paginate" on the workflow and then use the same setting as an auto-scroll.
And you are done! Now, all you need to do is check and run the crawler to make sure it works properly. To do that simply click, "Start Extraction" from the upper left corner of the screen. Select "Local Extraction", which means you run the crawler on your system and not on the cloud server. That is it!
Now the method of scraping a full-size image is slightly different. We will use the same example of downloading the pictures of sunsets from pexels.com to tell you how to download a full-size image.
- Start a new task and click on "+Task" under "Advanced Mode".
- Insert the URL of the selected webpage into the text box, then click “Save URL” to proceed.
- Individually, click the image to fetch the full-size image.
- After clicking on the first image, the Action Tip should say "Image selected, 100 similar images found," and you click on "Select All".
- Now, select "Loop click each image" this takes you to the page that has all the full-sized images".
Simply, click on the full sized-image and select "Extract URL of the selected image", and click on 'Go to Webpage' choose the "Next Page" button, and then select the "Loop clicked the selected link" on "Action Tips".
Guess what? You are done! Test the crawler and check if it works perfectly.