Add Reddit video support

Reddit links now download and post like the other platforms.

Two changes were needed, not just the URL pattern:

- Regex: yt-dlp's Reddit extractor only matches /comments/ permalinks, so
  the app's /r/<sub>/s/<code> share links and redd.it / v.redd.it
  shortlinks are listed explicitly — they redirect to the canonical URL,
  which yt-dlp follows. Without them the link is silently dropped.

- Format selector: Reddit publishes video and audio as separate DASH/HLS
  streams with no muxed rendition, so every `best...` term failed and
  yt-dlp aborted with "Requested format is not available". Added a
  bv*+ba merge tail (and a bare bv* for silent videos) to the normal and
  /force selectors. Muxed hosts still resolve at the earlier terms, so
  YouTube/IG/TikTok/X selection is unchanged.

Posts with no video report "No media found", already in the silent list,
so ordinary Reddit links shared in chat draw no reply.
This commit is contained in:
2026-08-14 05:00:16 -04:00
parent 94e8d7bf84
commit 3e3aba4157
2 changed files with 29 additions and 7 deletions
+5 -3
View File
@@ -1,8 +1,8 @@
# signal-bot
A Signal group-chat bot that grabs videos from links people post (X/Twitter,
Instagram, YouTube, TikTok) and posts them back into the chat, plus a couple of
toys for messing with the last video.
Instagram, YouTube, TikTok, Reddit) and posts them back into the chat, plus a
couple of toys for messing with the last video.
## What it does
@@ -16,7 +16,9 @@ toys for messing with the last video.
to refresh Instagram auth without touching the server.
Supported links: `x.com` / `twitter.com` (and `fxtwitter`/`vxtwitter`/`fixupx`
wrappers), `instagram.com/reel|p`, `youtube.com` / `youtu.be` / Shorts, and TikTok.
wrappers), `instagram.com/reel|p`, `youtube.com` / `youtu.be` / Shorts, TikTok,
and Reddit (`/comments/` permalinks, `/s/` app share links, `redd.it` and
`v.redd.it` shortlinks). Reddit posts with no video stay silent.
## How it's wired