feat(catalog): a video's related videos, without what the user has seen

GET /api/search/related/{video_id} reads the list YouTube shows beside a
video from the website's InnerTube "next" endpoint (no quota), and brings
it into the catalog the way live-search results come in. It leaves out
what the user watched or hid, here or in their Takeout history (unless
taken back to "new" since), blocked channels and the video itself, and
pages on until 20 are gathered (at most 4 pages). region=topical|hu picks
the locale the list is filled in. Its own per-user daily cap
(related_daily_limit_per_user, one event per opened list); a failed
scrape answers 422 youtube/unavailable.

The InnerTube request (live key, consent cookie, errors) moves into
youtube/innertube.py, shared by the search scrape and the related one.
This commit is contained in:
2026-10-24 16:00:37 +02:00
parent 4695e1a62f
commit 8b37c470ba
19 changed files with 2263 additions and 108 deletions
+4
View File
@@ -54,6 +54,10 @@
"label": "Backfill quota reserve",
"hint": "Units kept in reserve so scheduled backfill never starves interactive syncs / enrichment."
},
"related_daily_limit_per_user": {
"label": "Related videos — daily limit per user",
"hint": "Max related-video lists a user can open per day. They come from YouTube's website and spend no search quota; the videos in a list are looked up for 1 unit per 50. A pure anti-abuse limit. Set 0 to turn related videos off."
},
"search_daily_limit_per_user": {
"label": "Live search — daily limit per user",
"hint": "Max live YouTube searches per user per day. With the API source each search costs 100 units (so the shared budget affords only ~80-90/day total); with the scrape source it's a pure anti-abuse limit. Set 0 to disable live search."
+1
View File
@@ -188,6 +188,7 @@
"quota_spent": "Today's shared YouTube budget is spent. Try again tomorrow.",
"recipient_required": "A recipient email is required",
"registration_closed": "Registration is currently closed",
"related_daily_limit": "You've opened today's limit of related lists ({{limit}}). Try again tomorrow.",
"search_daily_limit": "You've reached today's YouTube search limit ({{limit}}). Try again tomorrow.",
"search_term_required": "Enter something to search for",
"session_gone": "The playback session ended",
@@ -10,6 +10,7 @@
"videos_enrich": "Video enrichment",
"videos_lookup": "Video lookup",
"videos_search": "Live search",
"videos_related": "Related videos",
"channels_discover": "Channel discovery",
"channels_subscribe": "Subscribe",
"channels_unsubscribe": "Unsubscribe",
+4
View File
@@ -54,6 +54,10 @@
"label": "Behúzási kvótatartalék",
"hint": "Tartalékban tartott egységek, hogy az ütemezett behúzás ne éheztesse ki az interaktív szinkront / dúsítást."
},
"related_daily_limit_per_user": {
"label": "Kapcsolódó videók — napi limit / felhasználó",
"hint": "Hány kapcsolódóvideó-listát nyithat meg egy felhasználó naponta. A listák a YouTube weboldaláról jönnek, keresési kvótát nem fogyasztanak; a bennük lévő videók lekérése 50-enként 1 egység. Tiszta visszaélés-elleni limit. 0 = a kapcsolódó videók kikapcsolva."
},
"search_daily_limit_per_user": {
"label": "Élő keresés — napi limit / felhasználó",
"hint": "Maximális élő YouTube-keresés felhasználónként naponta. Az API-forrásnál egy keresés 100 egységbe kerül (így a közös büdzséből összesen csak ~80-90 fér bele naponta); a scrape-forrásnál ez tiszta visszaélés-elleni limit. 0 = élő keresés kikapcsolva."
+1
View File
@@ -188,6 +188,7 @@
"quota_spent": "A mai közös YouTube-keret elfogyott. Próbáld holnap.",
"recipient_required": "Adj meg egy címzett e-mail címet",
"registration_closed": "A regisztráció jelenleg zárva van",
"related_daily_limit": "Elérted a mai kapcsolódó listák korlátját ({{limit}}). Próbáld holnap.",
"search_daily_limit": "Elérted a mai YouTube-keresési korlátot ({{limit}}). Próbáld holnap.",
"search_term_required": "Írj be egy keresőkifejezést",
"session_gone": "A lejátszási munkamenet véget ért",
@@ -10,6 +10,7 @@
"videos_enrich": "Videóadatok dúsítása",
"videos_lookup": "Videó-lekérdezés",
"videos_search": "Élő keresés",
"videos_related": "Kapcsolódó videók",
"channels_discover": "Csatorna-felfedezés a listákból",
"channels_subscribe": "Feliratkozás",
"channels_unsubscribe": "Leiratkozás",