Skip to content

Repository files navigation

SubDL Zig Scrapers

Subtitle scrapers in Zig with a shared provider API and a single scrapers binary.

ZigProvidersRuntime

Overview

  • 12 provider integrations behind one app layer: providers_app
  • One binary: scrapers
  • CLI mode by default
  • TUI mode available with --tui in the default build
  • Runtime HTTP implemented with Zig std.http.Client
  • No runtime curl dependency

Requirements

  • Zig 0.16.0-dev.2905+
  • Network access for provider queries and downloads

Providers

Provider idSite
subdl_comsubdl.com
opensubtitles_comopensubtitles.com
opensubtitles_orgopensubtitles.org
moviesubtitles_orgmoviesubtitles.org
moviesubtitlesrt_commoviesubtitlesrt.com
podnapisi_netpodnapisi.net
yifysubtitles_chyifysubtitles.ch
subtitlecat_comsubtitlecat.com
isubtitles_orgisubtitles.org
my_subs_comy-subs.co
subsource_netsubsource.net
tvsubtitles_nettvsubtitles.net

Quick Start

Build and test:

zig build
zig build test

List providers:

zig build run -- --list-providers

Run the CLI:

zig build run -- --query "The Matrix"

Install the binary:

zig build install
./zig-out/bin/scrapers --providers subdl_com,podnapisi_net --query "Inception"
./zig-out/bin/scrapers -pnone --query "Inception"

Build all supported targets into zig-out/bin:

zig build build-all-targets
zig build build-all-targets -Doptimize=ReleaseFast -Dstrip=true

Targets produced by build-all-targets:

  • scrapers-x86_64-linux-gnu
  • scrapers-aarch64-linux-gnu
  • scrapers-x86_64-macos-none
  • scrapers-aarch64-macos-none
  • scrapers-x86_64-windows-gnu.exe

Optional Features

The default build is intentionally conservative because some upstream integrations are still moving on Zig 0.16-dev.

Run the TUI:

zig build run -- --tui

Enable archive extraction for --extract:

zig build -Denable-unarr=true run -- --providers subsource_net --query "The Matrix" --extract

Enable browser automation support:

zig build -Denable-alldriver=true

Tracked upstream issues are documented in ISSUES.md.

Build Flags

  • -Doptimize=Debug|ReleaseSafe|ReleaseFast|ReleaseSmall
  • -Dstrip=true|false
  • -Dsingle-threaded=true|false
  • -Domit-frame-pointer=true|false
  • -Derror-tracing=true|false
  • -Dpic=true|false
  • -Dllvm=true|false
  • -Denable-tui=true|false
  • -Denable-alldriver=true|false
  • -Denable-unarr=true|false

build-all-targets defaults:

  • -Doptimize=ReleaseFast
  • -Dstrip=true

Use -Dllvm=true if the native GNU build hits host CRT .sframe relocation errors.

Docs

About

All your subtitle are belong to us

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages