Skip to content

Instantly share code, notes, and snippets.

View chiraagshah-qa's full-sized avatar

Chiraag Shah chiraagshah-qa

View GitHub Profile
@chiraagshah-qa
chiraagshah-qa / bulk_webpage_screenshots_csv.py
Last active October 6, 2022 10:25
Grab screenshots of sites from a csv file which contains Site Name and URL headers and reduce space by converting .png to .jpg.
import os
import time
import csv
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.chrome.options import Options
from PIL import Image
from tqdm import tqdm
@chiraagshah-qa
chiraagshah-qa / bulk_webpage_screenshots.py
Last active October 5, 2022 15:13 — forked from ilovefreesw/bulk_webpage_screenshots.py
A Python-Selenium script to bulk take screenshots of webpage using headless Chrome by reading a text file full of URLs. Screenshots are saved in a timestamped directory. You will need to add your location for sites_list, screenshots_dir_path and options.binary_location
import os
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.chrome.options import Options
from PIL import Image
from tqdm import tqdm
import time
lines = []