How to Take Full Page Screenshot in Bulk from Multiple URLs

0 Comments
Editor Ratings:
User Ratings:
[Total: 1 Average: 5]




This tutorial explains how to take full page screenshot in bulk from multiple URLs. In this post, I will talk about an automation script that uses Chrome internally to take full webpage screenshots. The script uses a text file to fetch URLs to take screenshot and saves all the webpage screenshots in PNG format.

There is literally no way to bulk screenshot webpages from URLs. There are some paid online services which does it but for free, you have got the best option with the script. The script basically automates Chrome in headless mode and takes full-page screenshot of all the websites you supply. The script is in Python and only needs a few dependencies, and then you are all good to go.

You can run the automation script mentioned in this post on Linux and MAC tool. But for this post, I will be using it on Windows. You can lave it running if you have more than 100 URLs, and then it will open each URL one by one and will save the screenshot in the specified folder. By default, the script saves the screenshot by renaming them according to the position it appears in the text file. But if you know programming, then you can create a custom name as well.

How to Take Full Page Screenshot in Bulk from Multiple URLs?

Here I will walk you through step by step guide to bulk take screenshots from URLs stored in a file. Let’s get started.

Step 1: Download and install Python on Windows from here. During the installation, do not forget to mark the “Add Python to PATH” option.

Step 2: Open command prompt with administrator rights. And then runt the following command to install the dependencies.

python -m pip install requests tqdm selenium

install dependencies

Step 3: The script uses Chrome browser, so make sure you have Chrome and updated to the latest version. Additionally, you will have to download Chrome driver file. Make sure to download the Chrome driver corresponding t the version of Chrome installed on your PC. Next, unzip the file and then move “chromedriver.exe” to “C:/Windows” folder.

Chromedriver in Windows Folder

Step 4: Get the script from this link. Save it somewhere on your PC and you can give it a name.

Step 5: Prepare the text file that will contain all the URLs to take full page screenshots. Make sure that each URL appears in a new line. See the screenshot below.

Links

Step 6: Open the script file using Notepad or a code editor. Change the lines in the beginning by specifying the output folder and full path to the text file that has all the URLs. You can see that in the screenshot below.

Configure Full webpage screenshot script

Step 7: Navigate the command prompt to the folder where you have the saved the script. Or, if you don’t know how to navigate, then just go to the folder where the script file is and press shift and right-click on the empty area to choose “Open Command or Terminal windows here” option.

Open Command Window

Step 8: Finally, run the command and see the progress. Wait for it to finish and when it is done, you can find all the full-page screenshots of the website in the output folder you specified in the script. This is as simple as that.

python bulk_webpage_screenshots.py

Bulk webapge Screenshots in Chrome

This is it. In this way, you can use this simple script to batch screenshot websites using Chrome. You won’t have to take help of heavily paid online services out there. You can leave the script running on a separate PC for maximum performance. Or, if you have a computer or Laptop with high specs, then you can continue doing your work alongside.

Final thoughts:

I recently covered how to convert webpages to PDF in bulk. And for that, I used the built-in feature of Chrome CLI. It does support screenshot functionality as well but can’t screenshot websites in full page mode. So, I had to go for Selenium and wrote the script myself after taking a little of help from Stack Overflow. The script works as intended and is able to capture whole page screenshot of all kinds of websites. So, just give it a try and let me know if you face any errors in the comments down below.

Editor Ratings:
User Ratings:
[Total: 1 Average: 5]

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer