npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cineru-scrapper

v0.1.0

Published

Cineru.lk scrapper — lightweight Sinhala subtitle & movie download-link scraper (search, details, subtitle zips, quality tiers, host links, token → real URL resolution). Built by Dew Coders.

Readme

cineru-scrapper

Cineru.lk movie scrapper — search Sinhala subtitle movies, pull full details, subtitle zips, every quality tier's host links, and resolve dl.cineru.lk token URLs into the real file links (Google Drive, Mega, Pixeldrain, …). Zero browser dependencies.

🔍 Built for cineru.lk's actual stack: the site exposes a clean JSON search endpoint (admin-ajax.php?action=cineru_search) and plain WordPress HTML for detail pages. No puppeteer, no stealth plugins, no headless Chrome needed.

🏗️ Built by Hansa DewminaDew Coders

Install

npm install cineru-scrapper
# or clone & link locally:
npm install
npm link

Requires Node >= 18 (uses built-in fetch).

Usage (API)

const { cineru } = require('cineru-scrapper');

// 1) Search (site's own JSON search engine — fast, paginated)
const res = await cineru.search('avatar', { page: 1, limit: 12 });
console.log(res);
// { query, page, totalPages, results: [{ id, title, source, link }] }

// 2) Legacy HTML search (richer: includes image + date + categories)
const res2 = await cineru.searchLegacy('avatar', { page: 2 });

// 3) Full movie details
const details = await cineru.getDetails('https://cineru.lk/?p=81540');
// { title, image, date, categories, description,
//   links: { trailer, imdb, wikipedia }, download: { tokenUrl, postId }, url }

// 4) Subtitle download link (resolves filename via HEAD on dl.cineru.lk)
const dl = await cineru.getDownloadLink(81540);
// { tokenUrl, postId, filename, contentType, size }

// 5) Full download panel — every quality tier + host links + stream URLs
const downloads = await cineru.getDownloads(81540);
// {
//   postId: 81540,
//   videoCopy: [{ quality: "WEBRip|1080p|X264|3.8 GB", links: [{ host, type, url }] }],
//   hcVideoCopy: [{ quality: "WEBRip|480p|X264|400 MB", links: [...] }],
//   watchOnline: { '720p': "https://bot.cinerustreams.com/..." }
// }

// 6) Resolve token URLs into the REAL file links (Google Drive, Mega, …)
//    Each `dl.cineru.lk/dl.php?token=...` answers with a 302 → Location.
//    Tokens are single-use — resolve right after fetching.
const resolved = await cineru.getDownloads(81540, { resolve: true });
// links now also carry `resolvedUrl` (e.g. https://drive.google.com/file/...)
// and `resolvedHost` (e.g. "drive.google.com", "mega.nz", "pixeldrain.com").

// …or resolve a single token directly:
const file = await cineru.resolveDownloadUrl('https://dl.cineru.lk/dl.php?token=...');
// { url: "https://drive.google.com/file/d/.../view?usp=sharing", host: "drive.google.com" }

Search options

| Option | Default | Description | | -------- | ---------- | --------------------------------------------- | | page | 1 | Page number | | limit | 12 | Results per page (AJAX search only) | | source | 'cineru' | 'cineru', 'sub', or '' for both sites |

Usage (CLI)

The CLI is fully interactive in a terminal — search results render as colored tables, then let you pick a movie, browse its details, copy or resolve links, and even stream a file straight to disk with a live progress bar. Every command also accepts --json for scripting.

# Interactive (default): table → movie picker → details/downloads menu
cineru-scrapper search "avatar"

# Non-interactive / scriptable
cineru-scrapper search "avatar" --json
cineru-scrapper search "avatar" --limit 6 --page 2
cineru-scrapper search-legacy "avatar" --page 2
cineru-scrapper details https://cineru.lk/?p=81540
cineru-scrapper downloads 81540 --resolve
cineru-scrapper get 81540 --quality "1080p" --host mega   # download to disk
cineru-scrapper get 81540                                  # interactive picker
cineru-scrapper resolve "https://dl.cineru.lk/dl.php?token=..."
cineru-scrapper config --set downloadDir ~/Movies          # persist defaults

Commands

| Command | What it does | | ---------------- | ------------------------------------------------------------------- | | search | Search; interactive table + movie picker, or --json for scripts | | search-legacy | Classic WordPress search page (richer fields) | | details | Full movie info (image, date, categories, description, links) | | downloads | Every quality tier + host link, optional --resolve | | get | Download the movie file to disk (interactive picker / flags) | | resolve | Turn one dl.cineru.lk token URL into the real file link | | config | Show / persist settings (--set key value)

Config

Settings are persisted to ~/.cineru-scrapper.json:

cineru-scrapper config                    # show current settings
cineru-scrapper config --set downloadDir ~/Movies
cineru-scrapper config --set concurrency 8

| Key | Default | Used by | | ------------- | ------------ | ----------------------------------------- | | downloadDir | downloads | get command output folder | | concurrency | 5 | token resolution in downloads --resolve | | source | cineru | search | | limit | 12 | search |

Example output

$ cineru-scrapper search "joker"

 Search results — "joker" (page 1/1)

┌────┬──────────────────────────────────────────┬───────┬────────┐
│ #  │ Title                                    │ ID    │ Source │
├────┼──────────────────────────────────────────┼───────┼────────┤
│  1 │ Joker (2019) Sinhala Subtitles | …       │ 4605  │ cineru │
│  2 │ Joker: Folie à Deux (2025) …            │ 75879 │ cineru │
└────┴──────────────────────────────────────────┴───────┴────────┘
  2 result(s) · use --json for raw output

$ cineru-scrapper search "joker" --json
{
  "query": "joker",
  "page": 1,
  "totalPages": 1,
  "results": [ { "id": 4605, "title": "Joker (2019) …", "source": "cineru", "link": "https://cineru.lk/?p=4605" } ]
}

How it works

  • Search hits https://cineru.lk/wp-admin/admin-ajax.php?action=cineru_search with q, page, limit, source params → clean JSON, paginated.
  • Legacy search parses the classic /?s= WordPress page (article.item-list).
  • Details fetches the post page and extracts the OpenGraph image, metadata, categories, description, trailer/IMDb/Wikipedia links, and the subtitle download token (data-link on #btn-download).
  • Download does a HEAD request on the dl.cineru.lk token URL to discover the real filename / content type / size.
  • Downloads calls the site's own cs_download_data AJAX endpoint (which the page normally loads into #down_mount) and parses every quality tier (videoCopy / hcVideoCopy) with per-host links (UserDrive, GDrive, Mega, Telegram, Pixeldrain, …) plus the watch-online stream URLs.
  • Resolve follows each dl.cineru.lk token's 302 redirect (with redirect: 'manual' so tokens aren't wasted following to a 403 page) and returns the real file URL — Google Drive, Mega, Pixeldrain, UsersDrive, Filespayouts, Telegram, etc. Pass { resolve: true } to getDownloads() to enrich every link with resolvedUrl / resolvedHost.

Notes & limitations

  • The site's WP REST API (/wp-json/...) is Cloudflare-blocked — this module deliberately avoids it.
  • dl.cineru.lk tokens are single-use: a token can only be resolved once, and the panel regenerates fresh tokens on every page/endpoint call. Always resolve tokens from the same getDownloads() result you intend to use.
  • Movie detail content (the subtitle download button) is behind a login wall on some posts; the download tokenUrl is still embedded in the page HTML for most public posts.
  • Respect the site's ToS and robots.txt. Scrape responsibly and rate-limit your own usage.

Roadmap

  • [x] cineru.lk search + details + download links
  • [x] cineru.lk full download panel (qualities, hosts, watch-online)
  • [x] token → real file URL resolution (Google Drive, Mega, …)
  • [x] interactive CLI UI (tables, pickers, download progress)
  • [ ] sub.lk (cross-site source already returned by the search engine)
  • [ ] More Sinhala subtitle sites
  • [ ] Optional caching layer

Credits

Created by Hansa Dewmina for Dew Coders.

License

MIT