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

eztv-api-pt

v1.3.1

Published

An EZTV API wrapper to get data from eztv.ag.

Downloads

50

Readme

eztv-api-pt

Build Status Coverage Status Dependency Status devDependency Status

An EZTV API wrapper to get data from eztv.ag.

Usage

Setup

npm install --save eztv-api-pt

Initialize

const EztvApi = require('eztv-api-pt')

// Create a new instance of the module.
const eztv = new EztvApi({
  baseUrl // The base url of eztv. Defaults to 'https://eztv.ag/'.
})

Example usage

Scraper

To use the web scraper you can use this workflow:

// Get all available shows on eztv.
eztv.getAllShows().then(res => {
  const [ data ] = res
  console.log(data)

  // Get data including latest episodes from eztv.
  return eztv.getShowData(data)

  // Or get all episodes from eztv.
  // return eztv.getShowEpisodes(data)
}).then(res => console.log(res))
  .catch(err => console.error(err))
API

To use the API of EZTV you can use this method:

// Use the API of EZTV.
eztv.getTorrents({
  page: 1,
  limit: 10, // 10 - 100
  imdb: 5016504 // tt5016503
}).then(res => console.log(res))
  .catch(err => console.error(err))

Documentation on the API can be found here.

Output

getAllShows

[{
    show: '10 O\'Clock Live',
    id: 449,
    slug: '10-o-clock-live'
  }, {
    show: '10 Things I Hate About You',
    id: 308,
    slug: '10-things-i-hate-about-you'
  },
  ...
}]

getShowData / getShowEpisodes

{ show: '10 O\'Clock Live',
  id: 449,
  slug: 'tt1811399',
  episodes:
   { '1':
      { '1':
         { '480p':
            { url: 'magnet:?xt=urn:btih:LMJXHHNOW33Z3YGXJLCTJZ23WK2D6VO4&dn=10.OClock.Live.S01E01.WS.PDTV.XviD-PVR&tr=udp://tracker.openbittorrent.com:80&tr=udp://open.demonii.com:80&tr=udp://tracker.coppersurfer.tk:80&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969',
              seeds: 0,
              peers: 0,
              provider: 'EZTV' } },
        ...
      }
    }
}

Nested within the episodes property there is the season number within the season number is the episode number and within the episode number are the different qualities of the torrent.

getTorrents

{
  imdb_id: '5016504',
  torrents_count: 68,
  limit: 10,
  page: 1,
  torrents: [
    {
      id: 369459,
      hash: '1d20121796f6daabdc0ec209167554eed0255692',
      filename: 'Preacher.S02E11.INTERNAL.WEB.H264-STRiFE[eztv].mkv',
      episode_url: 'https://eztv.ag/ep/369459/preacher-s02e11-internal-web-h264-strife/',
      torrent_url: 'https://zoink.ch/torrent/Preacher.S02E11.INTERNAL.WEB.H264-STRiFE[eztv].mkv.torrent',
      magnet_url: 'magnet:?xt=urn:btih:d466f75fd244bf96c02c3995a270da88087d55ae&dn=Preacher.S02E11.INTERNAL.WEB.H264-STRiFE%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce',
      title: 'Preacher S02E11 INTERNAL WEB H264-STRiFE EZTV',
      imdb_id: '5016504',
      season: '2',
      episode: '11',
      small_screenshot: '',
      large_screenshot: '',
      seeds: 19,
      peers: 13,
      date_released_unix: 1503992162,
      size_bytes: '2616073115'
    },
    ...
  ]
}

Testing

You can run tests with the following npm command:

 $ npm test

License

MIT License

Copyright (c) 2017 - eztv-api-pt - Released under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.