Created
August 3, 2021 23:37
-
-
Save yanissi/8f60fc2dbc6ad6ec86a0956372136e5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import time | |
import re | |
from slugify import slugify | |
from html2image import Html2Image | |
hti = Html2Image() | |
df = pd.read_csv("clippings.csv") | |
for clipping in df.itertuples(): | |
clipping = clipping[1] | |
fileName = slugify(clipping).replace("-html","").replace("www-","").replace("https-","") | |
output = hti.screenshot(url=clipping,save_as=f"{fileName}.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment