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

tvcom

v0.2.1

Published

Simple scraper to get the data from tv.com

Downloads

3

Readme

tvcom

A simple way to get data from the tv.com website.

Usage

tvcom is pretty straight forward. It has three methods, shows, episodes, summary.

shows(number, callback)

Returns an array of the number most popular tv-shows. It's should noted that this list is not sorted

var tvcom = require('tvcom');
tvcom.shows(10, function(err, shows) { ... });

/*
{
	'game-of-thrones': {
		id: 'game-of-thrones',
		title: 'Game of Thrones',
		icon: 'http://im0n.clkimg.com/i/sm/069/69088.jpg',
		description: 'Game of Thrones is an ...'
	},
 	'greys-anatomy': {
 		id: 'greys-anatomy',
		title: 'Grey\'s Anatomy',
		icon: 'http://im1n.clkimg.com/i/sm/000/227.jpg',
		description: 'Grey\'s Anatomy is a ...'
	},
	...
}
*/

episodes(id, callback)

Returns an array with all the seasons, with an array of all the episodes in that season.

var tvcom = require('tvcom');
tvcom.episodes('game-of-thrones', function(err, episodes) { ... });

/*
[
	[
		{
			title: 'A Hard Day\'s Night',
			firstAired: '3/27/05',
			season: '1',
			episode: '1',
			rating: '9.3',
			description: 'Meet Meredith Grey. Daughter of ...'
		},
		{
			title: 'The First Cut Is the Deepest',
			firstAired: '4/3/05',
			season: '1',
			episode: '2',
			rating: '9.1',
			description: 'The surgical staff tries to ...'
		},
		...
	],
	[
		{
			title: 'Raindrops Keep Falling On My Head',
			firstAired: '9/25/05',
			season: '2',
			episode: '1',
			rating: '9.3',
			description: 'Picks up where ...'
		},
		...
	],
	...
]
*/

summary(id, callback)

Returns an object with a description, some images, videos, and news. The data is from http://www.tv.com/shows/greys-anatomy

var tvcom = require('tvcom');
tvcom.summary('game-of-thrones', function(err, summary) { ... });

/*
{
	title: 'Grey\'s Anatomy',
	rating: '8.8',
	description: 'Grey\'s Anatomy is a ...' }
	cast: [
		{
			name: 'Camilla Luddington',
			role: 'Dr. Jo Wilson (Season 10+)',
			icon: '//dw.com.com/clear/c.gif?sid=1003&ptid=6138'
		},
		...
	],
	news: [
		{
			teaser: 'TV IN DA CLUBUPFRONTS 2013',
			title: 'News Briefs: Starz and 50 Cent Are Powering Up for a New DramaABC\'s 2013-2014 Schedule: S.H.I.E.L.D. on Tuesdays, Less DWTS, and OUAT \'s New Spinoff on Thursdays',
			link: 'http://tv.com/news/news-briefs-starz-and-50-cent-are-powering-up-for-a-new-drama-137124191630/',
			icon: '//dw.com.com/clear/c.gif?sid=1003&ptid=6138',
			comments: '7',
			date: '10 hours ago',
		    by: {
		    	name: 'Tim Surette',
				link: 'http://tv.com/news/author/TimSpot/'
			}
		},
		...
	],
	photos: [
		{
			icon: 'http://static.tvtome.com/images/misc/grey.gif',
			link: 'http://tv.com/shows/greys-anatomy/photos/image-1684/',
			title: 'Patrick Dempsey and Ellen Pompeo on Grey...',
			credit: '© 2013 American Broadcasting Companies, Inc.'
		},
		...
	],
	clips: [
		{
			icon: 'http://im0n.clkimg.com/i/em/2/325/2325054.jpg',
			link: 'http://tv.com/shows/greys-anatomy/watch/jessica-capshaw-interview-1882579/',
			title: 'Jessica Capshaw Interview',
			date: '9/25/09',
			time: '02:58'
		},
		...
	]
*/

License

MIT