From 0c0b39728c197dd697d78c1df4b6a69babb15cbe Mon Sep 17 00:00:00 2001 From: 0x1d Date: Tue, 18 Nov 2025 11:03:05 +0100 Subject: [PATCH] feat: convert on exit --- README.md | 6 +- go.mod | 3 + go.sum | 71 +++++ internal/downloader/downloader.go | 415 ++++++++++++++++++++++++++++-- 4 files changed, 476 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index dd81d5a..ac6d9b8 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ This installs the `sdl` binary into your `GOBIN` (defaults to `~/go/bin`). Ensur ## Usage ```bash -sdl https://example.com/path/to/playlist.m3u8 +sdl https://example.com/page-with-video ``` -The downloader automatically picks the highest-bandwidth variant when given a master playlist, downloads the segments, and transmuxes them into an `.mp4` container. You can override the output filename: +If the target URL is a webpage, `sdl` scans it for embedded HLS playlists (`.m3u8`) and downloads each one it finds. You can override the output filename (or prefix when multiple videos exist): ```bash sdl -o myvideo.mp4 https://example.com/path/to/playlist.m3u8 @@ -25,6 +25,7 @@ sdl -o myvideo.mp4 https://example.com/path/to/playlist.m3u8 ## Features - Follows HTTP redirects (up to 5 hops) +- Scrapes webpages for embedded HLS playlists (`