SubDL Zig Scrapers
Subtitle scrapers in Zig with a shared provider API and a single scrapers binary.
Overview
- 46 active providers exposed through one app layer:
providers_app
- 53 provider implementations retained in the registry and represented in the
live-test harness; harness coverage is not a live qualification result
- One binary:
scrapers
- CLI mode by default
- TUI mode available with
--tui in the default threaded build
- Runtime HTTP implemented with Zig
std.http.Client
- No runtime
curl dependency
Requirements
- Zig
0.17.0
- Network access for the initial dependency fetch and for provider queries and
downloads
On native Linux, zig build test also runs the offline live-runner cleanup
contract. That contract requires Bash 4.3 or newer, GNU timeout, flock,
mkfifo, and standard tee, grep, sed, and mktemp utilities. It executes success, failure, and
missing-marker cases; signal scenarios are deliberately not executed, while the
generated trap and cleanup structure is checked statically. These tools are not
runtime dependencies of the application.
After zig build --fetch has populated the Zig cache, deterministic builds and
tests do not require network access.
Package version 0.2.0 publishes the recommended scrapers module and the
lower-level compatibility module subdl. The optional unarr dependency is
lazy and is resolved only when archive extraction is selected. Browser handoff
is implemented locally, and TUI persistence uses Zig's std.json; neither
feature adds an upstream package dependency.
Library initialization
After wiring the scrapers module into your build, initialize its I/O runtime
before calling scraper APIs or starting workers:
const std = @import("std");
const scrapers = @import("scrapers");
pub fn main(init: std.process.Init) !void {
scrapers.setIo(init.io);
var client: std.http.Client = .{ .allocator = init.gpa, .io = init.io };
defer client.deinit();
var results = try scrapers.providers_app.search(init.gpa, &client, .subsource_net, "The Matrix");
defer results.deinit();
}
Call setIo once during initialization and keep the runtime alive until all
scraper work ends. It must support concurrent tasks for request deadlines; do
not replace it while work is running. The compatibility module exposes the same
setter as subdl.setIo(init.io). See Library API
for build wiring and download examples.
Providers
| Provider id |
Site |
subdl_com |
subdl.com |
opensubtitles_com |
opensubtitles.com |
moviesubtitles_org |
moviesubtitles.org |
yifysubtitles_ch |
yifysubtitles.ch |
subtitlecat_com |
subtitlecat.com |
isubtitles_org |
isubtitles.org |
subsource_net |
subsource.net |
sub_scene_com |
sub-scene.com |
gestdown_info |
gestdown.info |
subsunacs_net |
subsunacs.net |
subtitles_ajatt_top |
subtitles.ajatt.top |
subtis_io |
subtis.io |
greeksubs_net |
greeksubs.net |
indexsubtitle_cc |
indexsubtitle.cc |
sous_titres_eu |
sous-titres.eu |
cc_edatribe_com |
cc.edatribe.com |
subtitrari_noi_ro |
subtitrari-noi.ro |
subclub_eu |
subclub.eu |
subs_ro |
subs.ro |
subs4free_info |
subs4free.info |
tsukihime_org |
tsukihime.org |
subtitri_nekur_net |
subtitri.nekur.net |
subsynchro_com |
subsynchro.com |
titrari_ro |
titrari.ro |
subs_sab_bz |
subs.sab.bz |
subtitri_do_am |
subtitri.do.am |
prijevodi_online_org |
prijevodi-online.org |
animekalesi_com |
animekalesi.com |
subcentral_de |
subcentral.de |
subtitulamos_tv |
subtitulamos.tv |
feliratok_eu |
feliratok.eu |
animesub_info |
animesub.info |
animetosho_xyz |
animetosho.xyz |
kitsunekko_net |
kitsunekko.net |
thesubtitledb_org |
thesubtitledb.org |
napisy24_pl |
napisy24.pl |
nyasub_cz |
nyasub.cz |
subhd_tv |
subhd.tv |
fansubs_ru |
fansubs.ru |
legendei_net |
legendei.net |
zoom_lk |
zoom.lk |
justsubtitles_com |
justsubtitles.com |
wizdom_xyz |
wizdom.xyz |
miraianime_net |
miraianime.net |
grupahatak_pl |
grupahatak.pl |
jimaku_cc |
jimaku.cc |
Retained inactive implementations are opensubtitles_org and tvsubtitles_net
because their last observed user path was blocked by the Australian website-block page,
moviesubtitlesrt_com because its host was unreachable in that qualification,
greek_subtitles_com because its live search endpoint stalled or returned HTTP 524,
and my_subs_co, podnapisi_net, and animesubtitle_ir because their required
upstream hosts had no usable address.
They remain selectable by the live smoke harness, with other focused probes where
implemented, so future upstream recovery can be checked without advertising a
provider whose complete user path is known to be unreliable.
Here, “active” means exposed by the current CLI/TUI registry; it is not a claim
that every upstream was freshly reachable during the latest local run. Registry
and harness counts likewise do not mean that all 53 providers passed a current
live qualification.
gestdown_info is TV-only. yifysubtitles_ch is movie-only.
subtis_io is movie-only.
subtitles_ajatt_top focuses on Japanese subtitles for anime TV and movies.
greeksubs_net provides Greek subtitles for movies and TV.
sous_titres_eu provides French subtitles for movies and TV.
cc_edatribe_com provides English anime movie and TV captions.
subtitrari_noi_ro provides Romanian movie and TV subtitle archives.
subclub_eu provides Estonian subtitles for movies and TV episodes via direct subtitle files.
subs_ro provides Romanian and English subtitles for movies and TV.
subs4free_info is movie-only and provides Greek and English subtitles through a session-bound archive download flow.
tsukihime_org provides anime movie and TV subtitles from TsukiHime native cached subtitle storage; AnimeTosho-mirrored entries are skipped because that redirected storage was not reachable during qualification.
subtitri_nekur_net provides Latvian movie subtitles.
subsynchro_com is movie-only and provides French subtitles.
titrari_ro provides Romanian and English subtitles for movies and TV.
subs_sab_bz provides English and Bulgarian subtitles for movies and TV.
subtitri_do_am is movie-only and provides Latvian subtitles.
prijevodi_online_org is TV-only and provides Croatian, Serbian, Bosnian, Montenegrin, and related subtitle variants.
animekalesi_com is TV-only and provides Turkish anime subtitles.
subcentral_de is TV-only and provides German and English series subtitles.
subtitulamos_tv is TV-only and provides English, Spanish, Portuguese, Catalan, and Galician subtitles.
feliratok_eu is movie-only and provides Hungarian and English subtitles.
animesub_info provides Polish anime movie and TV subtitles.
animetosho_xyz provides multi-language anime movie and TV subtitles through AnimeTosho's public feed and verified XZ attachment downloads.
kitsunekko_net provides English and Japanese anime subtitles from the public Kitsunekko title directories; RAR and 7z entries are intentionally excluded.
thesubtitledb_org provides public multi-language movie and TV subtitles via IMDb title resolution and TheSubtitleDB's direct file API; no API key is required.
napisy24_pl provides Polish and selected English movie/TV subtitles through Napisy24's anonymous XML API and direct ZIP download endpoint.
nyasub_cz provides Czech anime movie/OVA and TV subtitles from NyaSub's public finished-translations catalog and direct WPDM subtitle links.
subhd_tv provides movie and TV subtitles through SubHD's public prepare-download flow.
fansubs_ru provides Russian anime movie and TV subtitles.
legendei_net provides Portuguese movie and TV subtitle archives, with language-specific posts when available.
zoom_lk provides Sinhala movie and TV season subtitle archives.
justsubtitles_com is movie-only and exposes server-rendered subtitle ZIPs through the public SubDL CDN.
wizdom_xyz provides Hebrew movie and TV subtitles through the public Wizdom
release API. Set SUBDL_WIZDOM_TMDB_API_KEY to an exact 32-character lowercase
hexadecimal TMDB v3 key to override the provider's upstream-published legacy
resolver key.
miraianime_net provides Arabic anime movie and TV subtitle archives.
grupahatak_pl is TV-only and provides Polish episode subtitle ZIPs.
jimaku_cc provides direct Japanese anime movie and TV subtitle files.
Network warning: subsynchro_com, subs_sab_bz, animesub_info, and
fansubs_ru currently depend on upstream workflows available only over plain
HTTP. The retained inactive tvsubtitles_net recovery path is also plain HTTP.
Searches and downloads through these paths are unencrypted, so avoid them on
untrusted networks. AnimeSub's short-lived cookie is restricted to the exact
provider route, but that does not encrypt the network hop.
Quick Start
Build and test:
zig build
zig build test
zig build test-http # native Python 3 + isolated loopback integration gate
zig build test-pty # native POSIX Python 3 + actual terminal navigation/shutdown
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,subsource_net --query "Inception"
./zig-out/bin/scrapers -pnone -p subdl_com --query "Inception"
Build all supported targets into zig-out/bin:
zig build build-all-targets
zig build build-all-targets -Doptimize=fast -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
TUI and archive extraction are enabled by default. Browser automation is opt-in.
Run the TUI:
zig build run -- --tui
Extract downloaded archives with --extract:
zig build run -- --providers subsource_net --query "The Matrix" --extract
Enable browser automation support:
zig build -Denable-alldriver=true
On Linux, when a fresh Cloudflare session is needed, session handoff launches a
locally installed Chromium-family browser through a private, deadline-bounded
CDP pipe.
Auto-discovery covers Chrome, Chromium, Edge, Brave, and Vivaldi; the root CDP
product must report Chrome or Chromium 154 or newer. DNS is restricted to pinned
public addresses for the challenged host and Cloudflare's challenge host. A
process-wide unroutable proxy denies traffic by default, with direct bypasses
limited to those exact HTTPS hosts on port 443; ambient and corporate proxy
settings are intentionally ignored. Required subdomains, CDNs, WebSockets, and
other origins therefore fail closed. New browsing targets, downloads, and
local/private targets are denied by browser policy and Chromium controls.
External-protocol navigation is monitored. The private browser's session bus
points to an inaccessible socket, and private failing xdg-email/xdg-open
stubs shadow ambient helpers while the inherited PATH remains available to
browser launch wrappers and graphical-session utilities.
With SUBDL_CF_HEADLESS unset or set to auto, a non-empty DISPLAY or
WAYLAND_DISPLAY starts an automatic visible-browser pass; if it does not
acquire a session, every browser candidate is retried headlessly. Each automatic
visible attempt is capped at 60 seconds, and the final 60 seconds of the
four-minute global acquisition deadline are reserved for the headless pass.
Without a graphical-display variable, automatic mode is headless-only. Use
SUBDL_CF_HEADLESS=0 (or headed) for a visible-only attempt with the full
remaining global deadline, and SUBDL_CF_HEADLESS=1 (or headless) for a
headless-only attempt. Empty and unrecognized SUBDL_CF_HEADLESS values also
select automatic mode. Set SUBDL_CHROMIUM_PATH