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 🙏

© 2025 – Pkg Stats / Ryan Hefner

the-scraping-machine

v0.0.3

Published

Let's make web scraping fun again!

Downloads

6

Readme

shieldsIO shieldsIO shieldsIO shieldsIO

The scraping machine

Under development - More news soon

gilling_machine

This is just the beginning of a long journey

Let's make web scraping fun again!

From a JSON Config file... you can create a web scraping script and see the output.

Concept

  1. You just need to define your needs in a JSON file, like demo.json
  2. The you execute node index demo.json in order to start the process in index.js
    • First it validates the arguments and data
    • Then decides the language to use. For now only Python +3 (Beautiful Soup) and Node.js (X-ray) supported
    • Then render all the info in the handlebars template, like templates/python.hbs or templates/node.hbs
  3. The script file is generated, like google.py or google.js
  4. The script will be executed as a process child by Node generating the final output, like google.json

Demo

Inside demo.json:

{
	"source_type": "url",
	"url": "http://google.es",
	"file_name": "google",
	"data": [
		{
			"name": "web-title",
			"type": "selector",
			"query": "title"
		}, {
			"name": "web2",
			"type": "selector",
			"query": "title"
		}
	]
}

Start the machine

  • For Python script output:
    node index.js demo.json 
    node index.js demo.json python
  • For Node script output
    node index.js demo.json js
    node index.js demo.json node

Output

[
    {
        "web-title": "Google",
        "web2": "Google"
    }
]

Testing

You can test your changes...

npm test

Future Implementations

  • [ ] Support for Node.js (X-Ray).
  • [ ] Support for CSS3 Selectors.
  • [ ] Support for recursive queries.
  • [ ] Support for "follow links", like a crawler.
  • [ ] Implementation as CLI
  • [x] Basic Testing
  • [x] esLint Support
  • [x] JSDoc Support
  • [x] Basic Gulp Tasks
  • [x] Example Folder

Achievements

v.0.0.3

Features:

  • Added support to JSDoc
  • Added Gulp Tasks
  • Added Basic Testing with Mocha, Chai and Istanbul
  • Added .editorconfig
  • Added esLint support
  • Added example folder
  • Added support to Node.js

Notes: Main target: Improved Proof of concept

v.0.0.2

Features:

  • Roadmap added
  • Added File strucutre
  • Defined a minimal json strcuture
  • Added minimal validation
  • Added a template engine
  • Added support for python
  • Added dynamic information from the setup config file

Notes: Main target: Proof of concept

v.0.0.1

Features:

Notes: Just a "Hello world"