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

zt-film-api

v1.3.3

Published

An API for zone-telechargement built from Scratch, Only for films

Downloads

32

Readme

zone-telechargement-api

An API for zone-telechargement built from Scratch.

⚠️ Disclaimer

This API is only for educational purposes. I am not responsible for any misuse of this API. Use it at your own risk.

Table of contents

Documentation

Installation

npm i zt-film-api

Usage

const zt = require("zt-film-api");
require("dotenv").config();
zt.setMoviesDbToken(process.env.MOVIESDB_API_KEY);

You must have a .env file in the root directory of your project with the following content:

MOVIESDB_API_KEY=<your_api_key>

You can get your API key from here.

zt.useBaseURL("<the url>");

You can add the url manually, or you can use this repo to get the current url.

let category = ""; // The category you want to search
// "films" or "series"
let query = ""; // The film you want to search

async function __main__() {
  let response1 = await zt.search(category, query);

  console.log("Search: ", response1, "\n");
}

__main__();

Here are a full examples:

const ZT = require("zt-film-api");
require("dotenv").config();
ZT.setMoviesDbToken(process.env.MOVIESDB_API_KEY);

ZT.useBaseURL("<the url>");

let category = "films"; // The category you want to search

//"films" or "series"

let query = "Interstellar"; // Your search query

async function __main__() {
  let response1 = await ZT.search(category, query);

  console.log("Search: ", response1, "\n");
}

__main__();

Should output:

Search:  [
  {
    title: 'Interstellar',
    url: '<url>',
    id: '634',
    image: '<image_url>',
    quality: 'Blu-Ray 1080p',
    language: '(TRUEFRENCH)',
    publishedOn: 2017-02-11T23:00:00.000Z,
    publishedTimestamp: 1486854000000
  },
  {
    title: 'Interstellar',
    url: '<url>',
    id: '2189',
    image: '<image',
    quality: 'DVDRIP',
    language: '(FRENCH)',
    publishedOn: 2017-09-22T22:00:00.000Z,
    publishedTimestamp: 1506117600000
  },
  {
    title: 'Interstellar',
    url: '<url>',
    id: '5895',
    image: '<image',
    quality: 'BDRIP',
    language: '(VOSTFR)',
    publishedOn: 2018-09-30T22:00:00.000Z,
    publishedTimestamp: 1538344800000
  }

  ...
]

Methods

setMoviesDbToken(value)

ZT.setMoviesDbToken("your_api_key");

Sets the API key for The Movies Database.

useBaseURL(value)

ZT.useBaseURL("<the url>");

Sets the base url for the API. You can use this repo to get the current url.

search(category, query, page)

let response = await ZT.search(category, query, 1);

Searches for a film category is the category you want to search. Currently, only films is supported. query is the film you want to search. page is optional, and defaults to 1. Data returned:

{
    <film_name>: [
        {
            url: <url>,
            id: <id>,
            image: <image_url>,
            quality: <quality>,
            language: <language>,
            publishedOn: <date>,
            publishedTimestamp: <timestamp>
        }
    ]
}

searchAll(category, query)

let response = await ZT.searchAll(category, query);

Searches for a film in all pages. category is the category you want to search. Currently, only films is supported. query is the film you want to search. Data returned:

{
    <film_name>: [
        {
            url: <url>,
            id: <id>,
            image: <image_url>,
            quality: <quality>,
            language: <language>,
            publishedOn: <date>,
            publishedTimestamp: <timestamp>
        }
    ]
}

getQueryDatas(categories, id)

let response = await ZT.getQueryDatas(categories, id);

Gets the datas of a film. categories is the category of the film. Currently, only films is supported. id is the id of the film.

If query is a film

Data returned:

{
    title: <title>,
    language: <language>,
    quality: <quality>,
    size: <size>,
    description: <description>,
    poster: <poster_url>,
    release_date: <release_date>,
    genres: [ <genres> ],
    vote_average: <vote_average>,
    directors: [ <directors> ],
    actors: [ <actors> ],
    downloadLink: {
        <download_website>: <link>
    }
}
If query is a serie
{
  ...
  downloadLink: {
    'Episode 1': {
      <download_website>: <link>,
    },
    'Episode 2': {
      <download_website>: <link>,
    },
    'Episode 3': {
      <download_website>: <link>,
    },
    ...
  }
}

Example:

//Get the datas from the first query of the search

let response1 = await ZT.searchAll(category, query);
console.log("Search: ", response1, "\n");
console.log(
  "\ngetQueryDatas: ",
  await ZT.getQueryDatas(category, category, response1[0].id),
  "\n"
);

License

MIT

Author

Thanks

I would like to thank Sylicium for making the core of this API. I just added some features and made it a npm package. Go check his repo out!