
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
yt-comment-dl
Advanced tools
Simple script for downloading YouTube comments without using the YouTube API. The output is in JSON format.
This is a maintained fork of egbertbouman/youtube-comment-downloader.
Preferably inside a python virtual environment install this package via:
pip install yt-comment-dl
Or directly from the GitHub repository:
pip install git+https://github.com/youssefadly237/yt-comment-dl.git
$ yt-comment-dl --help
usage: yt-comment-dl [-h] [--output OUTPUT] [--pretty] [--limit LIMIT] [--language LANGUAGE] [--sort {0,1}] url
Download YouTube comments without using the YouTube API
positional arguments:
url YouTube video URL or video ID
options:
-h, --help Show this help message and exit
--output OUTPUT, -o OUTPUT Output filename (default: comments_<video_id>.json)
--pretty, -p Pretty-print JSON output
--limit LIMIT, -l LIMIT Maximum number of comments to download
--language LANGUAGE, -a LANGUAGE Language for YouTube generated text (e.g. en)
--sort {0,1}, -s {0,1} Sort by: 0=popular, 1=recent (default: 1)
Download comments using a YouTube URL:
yt-comment-dl "https://www.youtube.com/watch?v=ScMzIvxBSi4" --output ScMzIvxBSi4.json
Download comments using just the video ID:
yt-comment-dl ScMzIvxBSi4 --output ScMzIvxBSi4.json
Download the 50 most popular comments with pretty formatting:
yt-comment-dl ScMzIvxBSi4 --sort 0 --limit 50 --pretty
For YouTube IDs starting with - (dash), you may need to use quotes:
yt-comment-dl "-idwithdash"
You can also use this script as a library. For instance, if you want to print out the 10 most popular comments for a particular YouTube video you can do the following:
from itertools import islice
from yt_comment_dl import YoutubeCommentDownloader
downloader = YoutubeCommentDownloader()
comments = downloader.get_comments('ScMzIvxBSi4', sort_by=0) # 0 = popular
for comment in islice(comments, 10):
print(comment.to_dict())
The output is a JSON array containing comment objects. Each comment has the following structure:
[
{
"cid": "comment_id",
"text": "Comment text",
"time": "2 hours ago",
"author": "Author Name",
"channel": "author_channel_id",
"votes": 42,
"photo": "author_profile_photo_url",
"heart": false,
"reply": false,
"time_parsed": 1234567890
}
]
MIT License - see LICENSE file for details
FAQs
Simple script for downloading Youtube comments without using the Youtube API
We found that yt-comment-dl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.