diff options
| author | Igor Soarez <igor@soarez.org> | 2026-11-18 12:44:11 +0000 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-11-18 12:44:11 +0000 |
| commit | 720b4b7f41a6394c074c22336bb22cc6e006b554 (patch) | |
| tree | 5b3d36d06ad55fd6d4cdb4f24a8c0d9c7328fcec /castle-search/README.md | |
| parent | 358cf43172f0028b079c49fa16f376e400d6cc25 (diff) | |
castle-search: YouTube transcripts, filed in a folder and returned
POST /youtube-transcript, described at /youtube/openapi.json: captions
only, manual over automatic, rolling repeats removed, filed as
<upload date>-<Title>.txt. yt-dlp updates itself daily and on failure;
a 429 falls back to youtube-transcript-api. Hermes's recipe from bambos.
Diffstat (limited to 'castle-search/README.md')
| -rw-r--r-- | castle-search/README.md | 14 |
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 |
