movie-scraper: Zenith Movies: The Scraper That Hides Its Handshake in WebAssembly
A tiny serverless stack that turns TMDB IDs into proxied HLS playback, then rewrites the stream so the browser never talks to the source.
- Zenith Movies is less a media app than a control-path trick that hides provider-specific access logic inside WebAssembly and keeps the browser out of the handshake.
- Its proxy layer rewrites HLS manifests so delivery stays inside the app, which is the practical move that makes the stream feel clean and self-contained.
- The frontend is intentionally thin because the hard work lives in the serverless backend, not in the UI.
- Compared with metadata APIs and full media centers, the repo owns a narrow but unusually sophisticated slice of the stack: access, rewrite, and playback.
Why the hard part is not playback, it is the handshake
At first glance, this looks like a simple movie scraper. It is not. The most interesting part is the bridge between the serverless function and the upstream provider: a compiled WebAssembly payload that helps generate the token needed to unlock the stream.
That matters because it shifts the repo out of the usual scrape-and-parse pattern. Instead of relying on brittle request strings or a shallow API wrapper, it hides the provider handshake inside a binary layer that is harder to inspect, harder to patch casually, and easier to keep stable when the upstream changes.
How the stream gets cleaned before the browser sees it
The second move is more practical than clever. Once the raw manifest is fetched, rewriteM3u8 rewrites the playlist so every segment URL points back through the app’s own /api?url=... endpoint. That keeps the browser on home turf, which sidesteps hotlink friction and makes CORS a non-event.
This is the kind of trick that makes a small scraper feel architectural. The app is not just relaying bytes. It is inserting itself into the delivery path, so every request after the manifest comes back through the same controlled edge.
| Project | Primary role | What it owns | Strength | Weakness |
|---|---|---|---|---|
| Zenith Movies | Streaming bridge | Handshake, manifest rewrite, delivery path | Controls the whole path from token to playback | Fragile and provider-specific |
| TMDb API | Metadata API | Movie and TV data | Structured, stable, easy to integrate | Does not deliver playback |
| OMDb API | Metadata API | Titles, posters, and basic film data | Simple request-response model | Limited scope and key-gated |
| imdbpy | Scraping library | IMDb data access | Deep IMDb coverage | Breaks when the site changes |
| Kodi / Plex / Jellyfin | Media suite | Library management and playback | Owns the full user-facing media experience | Much heavier than a narrow scraper |
That table is the useful frame. Zenith Movies does not compete by owning metadata better than TMDb or by being a full media platform like Plex. It wins, if that is the word, by owning a narrow and awkward middle layer: access plus delivery.
Why the frontend is intentionally thin
The UI is almost disposable. In index.html, the app reads a TMDB ID from the URL, fetches backdrop art, asks the serverless API for a stream, and then hands the result to hls.js. That is enough to make the whole stack feel like a finished product, even though the visible surface is doing very little.
<!-- Simplified flow from the frontend -->
const id = new URLSearchParams(location.search).get('id');
const stream = await fetch(`/api?id=${id}`).then(r => r.json());
const hls = new Hls();
hls.loadSource(stream.url);
hls.attachMedia(videoEl);
That thinness is a feature, not a missing piece. If the interesting logic lives in the handshake, the proxy, and the manifest rewrite, then the interface only has to get out of the way.
What this architecture says about modern scraping
The repo reads like a snapshot of how scraping has evolved. Simple request loops are no longer enough when providers add signature checks, anti-bot logic, and delivery constraints. So the stack spreads out: WebAssembly for the handshake, serverless for reachability, and proxy rewriting for clean delivery.
That also explains the project’s rough edges. Hardcoded values, fallback behavior, and a clearly experimental tone suggest something practical rather than polished. It feels like a tool built to solve one narrow problem reliably enough to be useful, not a platform designed to generalize.
| Layer | Traditional approach | Zenith Movies approach |
|---|---|---|
| Access | Plain HTTP requests | WASM-assisted token generation |
| Delivery | Direct provider playback | Proxy-rewritten HLS segments |
| Frontend | Feature-heavy player UI | Thin shell around playback |
| Resilience | Breaks when one route changes | Survives by splitting control and content paths |
That split is the article’s core argument. The browser never touches the messy part directly. It only sees the sanitized path after the app has already done the awkward work behind the curtain.
What it is competing with
Zenith Movies sits in an odd lane between metadata services and full media centers. TMDb and OMDb are clean data providers. imdbpy is a scraping library with a very different target. Kodi, Plex, and Jellyfin own the whole media experience, from library management to playback.
| Project | Layer owned | Best at | Not built for |
|---|---|---|---|
| TMDb / OMDb | Metadata | Structured film data | Playback delivery |
| imdbpy | Source scraping | IMDb-specific retrieval | Streaming infrastructure |
| Kodi / Plex / Jellyfin | Full stack media | Library and playback management | Tiny, provider-specific handshake tricks |
| Zenith Movies | Access plus delivery | Hiding the handshake and rewriting the stream | General-purpose media management |
That is why the repo feels more like a private instrument than a platform. It owns one awkward slice of the stack, and it owns that slice with more sophistication than its size would suggest.
Why this repo feels like a private tool, not a platform
The public footprint is tiny, and the code reads that way too. It is pragmatic, narrow, and a little volatile. That is not a criticism. It is the shape of a project built to solve a specific problem under specific constraints.
Seen that way, Zenith Movies is less a movie app than a demonstration of a pattern. When the easy route is blocked, the solution can be to split the problem into separate layers, hide the fragile part in one layer, and rewrite the delivery path in another.





