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

d-forde-scraper

v0.1.1

Published

Web Scrapper created for Web Apps Assignment 2

Downloads

2

Readme

#About This package was created as part of an assignment based around creating and publishing an NPM package.

#Current functionality Scrape a reddit page in order to get top posts, their score, username, link, subreddit name.

Scrape a youtube search in order to get video details such as title, user channel,

#Future functionality

  • I'm currently working on trying to get support for other sites.
  • Potentially allow for users to run the scraper from command line.

#Example code use

var scrape = require('d-forde-scraper')

//Reddit Example
var limit=45;
var url ="/r/movies";
var pages = 2; // Each page = 25 results So 45 results is on 2 pages | 70 = 3 pages etc...
scrape.scrapeReddit(url, limit, pages);

//Youtube Search scrape
term = "cats in hats";
filename ="youtube";
scrape.scrapeYoutube(term, 3, filename);

#Example Reddit.json

{
    "rank": "2",
    "subreddit": "movies",
    "title": "LeBron James' 'Space Jam' Sequel Finds Director with Justin Lin",
    "link": "http://www.hollywoodreporter.com/news/space-jam-sequel-finds-director-834978?utm_source=Sailthru&utm_medium=email&utm_campaign=THR%20Breaking%20News_now_2016-05-02%2010:39:52_rford&utm_term=hollywoodreporter_breakingnews",
    "score": "3938",
    "user": "Chrisortiz"
}{
    "rank": "3",
    "subreddit": "movies",
    "title": "'The Neon Demon' Official Poster",
    "link": "http://i.imgur.com/ePOfXbs.jpg",
    "score": "2984",
    "user": "filmfanatic5"
}{
    "rank": "4",
    "subreddit": "movies",
    "title": "Ironhead studios has been behind or taken part in costume design for many of the recent comic book movies, but has gone largely uncredited, including for the Batsuits in BvS. These guys deserve more credit. Also bonus alt (and better) Apocalypse costume.",
    "link": "https://youtu.be/EBi_TqieaQ4",
    "score": "1111",
    "user": "eternallylearning"
}

#Example youtube.json

{
    "title": "Cats In Hats ~ best 18 cats in hats",
    "views": "10,596 views",
    "channel": "ESL and Popular Culture",
    "desc": "more cat videos here http://www.youtube.com/playlist?list=PL-rmNKGsfF5VkbOQeQr... Cat Wearing Funny Hat ..."
}{
    "title": "Cats With Hats (Extended Version) | Go You GoDaddy Commercial",
    "views": "8,742 views",
    "channel": "GoDaddy",
    "desc": "Johanna has a passion for making hats for cats. GoDaddy helped her turn her crazy idea into a crazy successful business."
}{
    "title": "Kittens Wearing Funny Hats (Cute cat pictures with funny song)",
    "views": "24,370 views",
    "channel": "Samuel Stokes",
    "desc": "MP3 Purchase Link: http://www.sheetmusicplus.com/title/20056355 This is a song about putting off doing anything important in ..."
}{
    "title": "Cat In The Hat Trailer",
    "views": "1,133,559 views",
    "channel": "Tim Armstrong",
    "desc": "Cat In The Hat Trailer."
}