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 🙏

© 2024 – Pkg Stats / Ryan Hefner

demo_first_module

v1.0.1

Published

This is personal project for web crawling/scraping topics. It includes few ways to crawl the data mainly using [Node.js](https://nodejs.org/en/) such as:

Downloads

5

Readme

Crawling data from website using Node.js

This is personal project for web crawling/scraping topics. It includes few ways to crawl the data mainly using Node.js such as:

Installation

This project requires Node.js to run.
Install the dependencies

$ npm install

Imdb Crawling

This project is particular for Imdb website https://www.imdb.com/. We can crawl both by using CLI or running web server and perform as a RESTful API.

Crawl by using CLI

To crawl by using cli, we need to indicate argvs after command node index.js with these options:

Options:
  -V, --version            output the version number
  -p, --project <project>  select a specific project. Example -p imdb
  -u, --url <url>          a path/url to the crawling site
  -i, --id <id>            id of movie or list of ids of movie delimeter by -
  -l, --list <id>          id of list or list of ids of list delimeter by -
  -o, --out <name>         output the result as <name>.json
  -h, --help               display help for command

Example:

node index.js -p imdb -u http://www.imdb.com/list/ls066692796
node index.js -p imdb -l ls066692796
node index.js -p imdb -l ls066692796 -o result
node index.js -p imdb -i tt0100234

imdb-test-cli

Crawl by id or list of id

To run this project, following the installation and run command npm run start or node index.js.
Go to http://localhost:8000/imdb/:ids with :ids is a list of id (delimiter by -) of the movies that you want to crawl Append the querry ?out=true at the end of URL to get the file output name output.json in directory.

For example with movie Avengers: End Game, its id is tt4154796. Thus, go to http://localhost:8000/imdb/tt4154796 and view the result
imdb-test-img

For example with list of movies such as http://localhost:8000/imdb/tt6723592-tt9686708-tt8579674
imdb-test-list-img

Crawl by list of movies (created by user)

To run this project, following the installation and run command npm run start or node index.js.
Go to http://localhost:8000/imdb/l/:ids with :ids is a list of list (delimiter by -) of the movies that you want to crawl Append the querry ?out=true at the end of URL to get the file output name output.json in directory.

For example with the list Web series (https://www.imdb.com/list/ls095501479), its id is ls095501479. Thus, go to http://localhost:8000/imdb/l/ls095501479 and view the result
imdb-test-img