i did a TON of things
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
# picsmics4
|
# picsmics4
|
||||||
|
|
||||||
Memorializing the legendary comment thread on DrazenXLive's *Reptilia* The Strokes, Rock Band video.
|
Memorializing the legendary comment thread on DrazenXLive's *Reptilia* The Strokes, Rock Band video.
|
||||||
|
|
||||||
|
The cutoff for the initial search of comments was Jan 1, 2026, at 6 minutes and 7 seconds. Everything from there can be dynamically changed / updated but everything from before will be perserved for authentcitiy and archive purposes.
|
||||||
11168
docs/comments.json
11168
docs/comments.json
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>picsmics4 – Reptilia Comment Thread Archive</title>
|
<title>The picsmics4 Story</title>
|
||||||
<meta name="description" content="Memorializing the legendary comment thread on DrazenXLive's Reptilia – The Strokes, Rock Band video. Browse every comment and relive internet history." />
|
<meta name="description" content="Memorializing the legendary comment thread on DrazenXLive's Reptilia – The Strokes, Rock Band video. Browse every comment and relive internet history." />
|
||||||
<meta name="keywords" content="picsmics4, DrazenXLive, Reptilia, The Strokes, Rock Band, comment thread, legendary comments, internet history, YouTube comments, archive" />
|
<meta name="keywords" content="picsmics4, DrazenXLive, Reptilia, The Strokes, Rock Band, comment thread, legendary comments, internet history, YouTube comments, archive" />
|
||||||
<meta name="author" content="DerexXD" />
|
<meta name="author" content="DerexXD" />
|
||||||
|
|||||||
@@ -1,15 +1,30 @@
|
|||||||
import json
|
import json
|
||||||
|
import os
|
||||||
from yt_dlp import YoutubeDL
|
from yt_dlp import YoutubeDL
|
||||||
|
|
||||||
url = "https://www.youtube.com/watch?v=lW7vWfRI5oI"
|
url = "https://www.youtube.com/watch?v=lW7vWfRI5oI"
|
||||||
|
original_path = "docs/comments_ORIGINAL.json" # the original, authentic comments from before cutoff (in case they get edited/deleted one day)
|
||||||
output_path = "docs/comments.json"
|
output_path = "docs/comments.json"
|
||||||
|
CUTOFF = 1767247567 # Jan 1 2026 UTC at SIX SEVEN
|
||||||
|
|
||||||
with YoutubeDL({"skip_download": True, "getcomments": True}) as derexXD:
|
# Load the frozen original comments (pre-cutoff, never modified)
|
||||||
info = derexXD.extract_info(url, download=False)
|
original = json.load(open(original_path, encoding="utf-8")) if os.path.exists(original_path) else []
|
||||||
|
# ^^ this is a LONG ternary btw
|
||||||
|
|
||||||
comments = sorted(info.get("comments", []), key=lambda x: x.get("timestamp", 0))
|
with YoutubeDL({"skip_download": True, "getcomments": True}) as ydl:
|
||||||
|
scraped = ydl.extract_info(url, download=False).get("comments", [])
|
||||||
|
|
||||||
with open(output_path, "w") as file:
|
new_by_id = {}
|
||||||
json.dump(comments, file, indent=2)
|
for c in scraped:
|
||||||
|
if c.get("timestamp", 0) >= CUTOFF and c.get("id"):
|
||||||
|
new_by_id[c["id"]] = c
|
||||||
|
|
||||||
print(f"Done\nExtracted {len(comments)} comments from el video (sorted oldest to newest)")
|
# we'll grab comments that are after the cutoff, those are what will be appended
|
||||||
|
|
||||||
|
merged = original + sorted(new_by_id.values(), key=lambda x: x.get("timestamp", 0))
|
||||||
|
|
||||||
|
with open(output_path, "w", encoding="utf-8") as f:
|
||||||
|
json.dump(merged, f, indent=2, ensure_ascii=False)
|
||||||
|
|
||||||
|
|
||||||
|
print(f"Done\n{len(original)} original comments + {len(new_by_id)} new comments = {len(merged)} total")
|
||||||
1
google3e243da49c638b18.html
Normal file
1
google3e243da49c638b18.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
google-site-verification: google3e243da49c638b18.html
|
||||||
Reference in New Issue
Block a user