initial commit i watched a youtube video essay on this guy and was so inspired to make this, copied over some files from another webpage i test made

This commit is contained in:
2026-02-23 20:30:09 -06:00
parent 0a0be9ca9c
commit 5f5d710613
8 changed files with 200098 additions and 0 deletions

14
extract_comments.py Normal file
View File

@@ -0,0 +1,14 @@
import json
from yt_dlp import YoutubeDL
url = "https://www.youtube.com/watch?v=lW7vWfRI5oI"
with YoutubeDL({"skip_download": True, "getcomments": True}) as derexXD:
info = derexXD.extract_info(url, download=False)
comments = sorted(info.get("comments", []), key=lambda x: x.get("timestamp", 0))
with open("docs/comments.json", "w") as file:
json.dump(comments, file, indent=2)
print(f"Done\nExtracted {len(comments)} comments from el video (sorted oldest to newest)")