aboutsummaryrefslogtreecommitdiff
path: root/castle-search/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'castle-search/README.md')
-rw-r--r--castle-search/README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/castle-search/README.md b/castle-search/README.md
index cf15aa1..1621fe3 100644
--- a/castle-search/README.md
+++ b/castle-search/README.md
@@ -85,6 +85,20 @@ again, once. It tries at most once every 30 minutes, never sends the password
twice in one try, and stops at any step it does not recognise, such as a
captcha, saying a person has to sign in. A sign-in takes about 6 s.
+### YouTube transcripts
+
+`POST /youtube-transcript` `{"url": "https://youtu.be/...", "language": "en"}`
+files a YouTube video's transcript as plain text in `CCS_TRANSCRIPT_DIR`, named
+`<upload date>-<Title-With-Dashes>.txt`, and returns it with the title,
+channel, upload date and length (`src/youtube.ts`). Captions only, never the
+video: human-written when the video has them, YouTube's automatic ones
+otherwise, with the rolling repeats of automatic captions taken out. A video
+filed before is read back from the folder. yt-dlp (`CCS_YTDLP`) updates
+itself at most daily, and again when a fetch fails; when YouTube rate-limits
+captions (HTTP 429), the text comes from youtube-transcript-api
+(`CCS_YT_PYTHON`) instead. `GET /youtube/openapi.json` describes it apart from
+X.com, as "YouTube". The recipe is Hermes's, from bambos.
+
## Engines
Four, with independent indexes and independent rate limits. That last part is