https://jonathanlawhh.com/works/nft/
Generating a word cloud based on captions from YouTubers video playlist.
Using WordCloud for Python by Andreas Muller!
This project may not work in the future if YouTube updated their website code.
Install Python >3.8
$ git clone https://github.com/jonathanlawhh/word-art-from-youtube-captions.git
$ cd word-art-from-youtube-captions
$ pip3 install -r requirements.txt
scrap.py
Running python scrap.py
in console will start the program.
Input the playlist URL accordingly and the script will run through every video in that playlist,
attempt to extract the English caption, and save it in the export folder.
YouTube playlist URL should look like: https://www.youtube.com/playlist?list=XXX
create_wordcloud.py
Running python create_wordcloud.py
will give you the option in order to:
- Select the extracted captions from scrap.py output in exports folder
- Select a mask for your word art. White will be the excluded area. Please refer to mask folder for sample.
- Generate the word art in SVG and PNG in the export folder with the dataset name.
export folder
All dataset of captions and generated word art will be kept here.
mask folder
The mask to use when generating the word art can be kept here and selected later.
Roboto-Regular.ttf
Font used in word art. Feel free to change.