Youtube videos are a great source of knowledge. However, when it comes to Youtube comments most of us cringe, as youtube comments are home for trolls and similar. But there are some comment sections out there that have some of the finest youtube comments you will ever find. You will enjoy reading and would want to keep it for future use and analysis.
However, the most common method of archiving those comments are either copy & paste or taking a screenshot.
Syntax of Output file
"text":"thank you for this!",
"time":"3 weeks ago",
Install Youtube Comment Downloader
1. Clone the repository to your local machine
git clone https://github.com/egbertbouman/youtube-comment-downloader.git
2. Goto the youtube-comment-downloader directory
3. Install required python modules
pip install requests
pip install lxml
pip install cssselect
4. Execute the following commands
Replace VIDEO_ID with the ID of the youtube video you want to download the comments from.
XYZABCDEFG is the video ID
python downloader.py --youtubeid VIDEO_ID --output VIDEO_ID.json
python downloader.py --youtubeid ScMzIvxBSi4 --output ScMzIvxBSi4.json
5. You will be notified of how many comments were found in the terminal:
- This script doesn’t use the youtube API to extract comments
- For Youtube IDs starting with
- (dash) you will need to run the script with:
- To limit the size of the output file it is in delimited JSON, however, you can change the structure using an online JSON Formatter tools.
This content has been shared for Educational And Non-Profit Purpose ONLY