YT Comments To Image
About
Create Screenshots of YouTube comments.
Usage
- Save a youtube html page with comments
- Run the
convert.py
python script to generate the png files containing the comments
python convert.py commnets.html
- The output is in the
out
directory
Idea
- The script will create a
out
directory to output the images to. - The script generates a
index.html
file to save the progress and uses Html2Image to convert that file to a PNG. youtubestrap.html
contains the styles found in the head of any YouTube video web page and the body that will be used to wrap a single comment.comments.html
is an example file with the comments from the Sigma Male Theme Song video - engineer grindset.- The script looks for the
ytd-comment-renderer
tag in the HTML file, so it’s ok if the input file does not contain the entire web page and only a few copied pasted comments with inspect element. - The
div
tag in theyoutubestrap.html
file with the idHEREISCONTENT
will wrap the comment with the tagytd-comment-renderer
so don’t remove that or change it.