Swiftpack.co - fcanas/scrape as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by fcanas.
fcanas/scrape 0.2
Download HLS Streams
⭐️ 4
🕓 2 years ago
macOS
.package(url: "https://github.com/fcanas/scrape.git", from: "0.2")

scrape

Download HLS streams

usage: scrape [-p] [-v] input_url output_url
  input_url     a remote URL to an m3u8 HLS playlist
  output_url    a local path where the HLS stream should be saved
  -p            download only playlist files
  -v            verbose output

Caveat Emptor

Scrape only vaguely works. You'd be crazy to want to use it.

  • It attempts to download several resources simultaneously. This tends to fail for a variety of reasons. It works best for short HLS streams with few variants.
  • It doesn't reload playlists. That means for live streams, it will only download a snapshot of resources that are exposed at the point in time a playlist is fetched.
  • It preserves directory structure, which is sometimes good, and sometimes catastrophic. Cross-domain resources are especially problematic.
  • It reports progress by telling you what is downloaded, nothing about what remains.
  • It doesn't let you select a variant. It's all or nothing.
  • It doesn't retry on failure.

GitHub

link
Stars: 4
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.2
2 years ago

Since 0.1

  • Added a -h, --help flag to show usage without an error
  • Added long-form flags for -p: --playlist-only and -v: --verbose

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics