Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

rafipiccolo/yggtorrent-api

Repository files navigation

Issues

vu que le site s'est doté de l'anti ddos de cloudflare il est difficile de l'aspirer avec une simple requete http. il existe cependant des solutions (simuler un navigateur / injecter des cookies valides).

Si quelqu'un veut aider. Voici l'issue : see issue

Install

npm install yggtorrent-api

Description

yggtorrent scrapper

Exemple

See exemple file for details :

exemple file

functions

constructor : specify host, login and password

var ygg = new Yggtorrent({
    host: 'https://yggtorrent.si',
    searchhost: 'https://www2.yggtorrent.si',
    username: 'xxx',
    password: 'xxx',
});

login : do login

ygg.login((err) => {
    if (err) return console.log('error', err);

    console.log('logged')
})

getRatio: get ratio (need login)

ygg.getRatio((err, data) => {
    if (err) return console.log('error', err);

    console.log(data)
    // { upload: ' 2.42To', download: ' 1.62To', ratio: '1.493' }
})

search: search torrents (dont need login)

ygg.search('chernobyl s01', (err, data) => {
    if (err) return console.log('error', err);

    console.log(data)
})

// displays :
[
    {
        url: 'https: //www2.yggtorrent.pe/torrent/filmvidéo/série-tv/512032-chernobyl+s01+2019+s01+multi+bdrip+dtshdma+1080p+x265+cyril2000',
        name: 'Chernobyl.S01.(2019).S01.MULTI.BDRIP.DTSHDMA.1080p.x265.Cyril2000',
        size: '17.62Go',
        downloadurl: 'https: //www3.yggtorrent.pe/engine/download_torrent?id=512032'
    },
    {
        url: 'https: //www2.yggtorrent.pe/torrent/filmvidéo/série-tv/462722-chernobyl+s01+multi+1080p+amzn+web-dl+h264-none',
        name: 'Chernobyl.S01.MULTi.1080p.AMZN.WEB-DL.H264-NoNE',
        size: '22.13Go',
        downloadurl: 'https: //www3.yggtorrent.pe/engine/download_torrent?id=462722'
    },
    ...
]

About

yggtorrent scrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published