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

kerala-lottery-scraper

v1.0.4

Published

Scrape Kerala Lottery results and maintain a 7-day history.

Readme

Kerala Lottery Scraper

A lightweight, automated Node.js package to scrape and live-update Kerala Lottery results. It actively fetches results as they are published and maintains a rolling 7-day JSON history.

Changelog

v1.0.4 — 2026-08-16

  • Bug fix: Added filter to ignore stray 'Repeated Numbers' blocks from the footer of the results page to prevent erroneous trailing numbers in the prize arrays.

v1.0.3 — 2026-08-14

  • Bug fix (restored): Year numbers (2024-2027) from page footers are filtered out again (accidentally removed in v1.0.2).
  • Bug fix (refined): Top-tier prizes (1st/2nd/3rd/Consolation) require a 2-letter prefix (e.g. PN 809878). Lower-tier prizes (4th–9th) correctly accept bare 4-digit numbers (e.g. 0315, 1948) since the source page lists them as "last four digits".
  • Bug fix: Draw gate check now requires at least one of the top-three prize tiers (1st, 2nd, 3rd) to have winners. Unpublished draws with only stray numbers are correctly filtered out (returns null → skipped).

v1.0.2 — 2026-08-14

  • Bug fix: Ticket number regex requires a 2-letter prefix for top-tier prizes. Bare numbers like 5000 are no longer accepted.
  • Bug fix: Draw gate check requires top-three prize tiers to have winners.

Features

  • Live Auto-Update: Built-in, timezone-aware scheduler that automatically checks for results every 5 minutes during active draw hours (3:00 PM - 4:45 PM IST).
  • Comprehensive Data: Automatically parses and extracts all 9 prize categories (1st Prize, 2nd Prize, 3rd Prize, Consolation Prize, etc.).
  • Dynamic Prize Values: Identifies varying prize amounts (e.g. ₹1,00,00,000 for regular draws or ₹10 Crores for bumpers) and injects them into the output structure.
  • 7-Day Rolling Window: Efficiently maintains exactly 7 days of results in result.json automatically dropping older days.
  • Ready to Use: Designed as an easy drop-in for other Node.js apps.

Installation

npm install kerala-lottery-scraper

Usage

As a standalone script

You can start the scraper directly from your command line:

npm start

Note: If you start the app outside of 3:00 PM - 4:45 PM IST, it will stand by and wait for the draw window before actively hitting the network.

As a module in your Node.js app

const lotteryScraper = require('kerala-lottery-scraper');

// Start the automatic background polling (respects 3 PM - 4:45 PM IST active window)
lotteryScraper.startAutoUpdate();

// Stop the automatic background polling
// lotteryScraper.stopAutoUpdate();

// Force an immediate update right now, regardless of the time
// lotteryScraper.forceUpdate();

// Get the current list of parsed results synchronously from result.json
const currentResults = lotteryScraper.getResults();
console.log(currentResults);

Output Structure (result.json)

[
  {
    "date": "13-08-2026",
    "lottery": "Karunya Plus",
    "code": "KN-636",
    "firstPrize(₹1,00,00,000)": [
      "PN 809878"
    ],
    "secondPrize(₹30,00,000)": [
      "PW 864399"
    ],
    "consolationPrize(₹5,000)": [
      "PO 809878"
    ]
    // ... up to 9th Prize
  }
]

Author

Babu Perumana ([email protected])