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

realdebrid

v0.1.1

Published

real-debrid.com API library

Downloads

17

Readme

node-realdebrid

A simple API interface for real-debrid.com in node.js.

Install

npm install realdebrid

Getting started

Real-Debrid suggests to luse cookies instead of logging in every time we need to unrestrict a link.

To avoid SQL queries it would be good to use the cookie you will have on the login page, it is valid during a very long time

so we start by logging in:

var realdebrid = require('realdebrid');
realdebrid.login('username', 'password', function (err) {
    //If err is null, everything is okay.
});

and now we can start unrestricting links:

var realdebrid = require('realdebrid');
realdebrid.login('username', 'password', function (err) {
    if (!err) {
        realdebrid.unrestrict('http://www.sockshare.com/file/3A6FF548272EA378', function (err, data) {
            //do something
        });
    }
});

API Reference

realdebrid.login(user, pass, callback)

Login to real-debrid. callback (optional) takes one argument err which is either null if everything is okay, or an error object. Every other method, except getValidHosters, requires to run this one first.

realdebrid.login('username', 'password', function (err) {
    if (err) {
        console.log('Something went wrong!', err);
    } else {
        console.log('Great success!');
    }
});

realdebrid.account(callback)

Get informations about the account that is logged into real-debrid. callback takes two arguments, err and data.

realdebrid.account(function (err, data) {
    if (err) {
        console.log('Something went wrong!', err);
    } else {
        console.log(data);
    }
});

Example output:

{
    "username": "*************",
    "avatar": "https://cdn.realdebrid.xtnetwork.fr/images/forum/empty.png",
    "email": "*************",
    "points": "123",
    "type": "premium",
    "expiration": "0000000000",
    "expiration-txt": "01/01/1970 00:00:00",
    "premium-left": -12345,
    "limits": {
        "available_4shared.com": 4,
        "available_bitshare.com": 7,
    },
    "limited": [
        {
            "hoster": "4s",
            "name": "4Shared",
            "url": "4shared.com",
            "image": "https://cdn.realdebrid.xtnetwork.fr/0134/images/hosters/4shared.png",
            "downloaded": 0,
            "limit": "4",
            "additional_traffic": 0,
            "available": 4
        },
        {
            "hoster": "bs",
            "name": "Bitshare",
            "url": "bitshare.com",
            "image": "https://cdn.realdebrid.xtnetwork.fr/0134/images/hosters/bitshare.png",
            "downloaded": 0,
            "limit": "7",
            "additional_traffic": 0,
            "available": 7
        }
    ]
}

realdebrid.unrestrict(link, password, callback)

Unrestrict a link, optionally tell the password to the file. callback takes two arguments, err and data.

realdebrid.unrestrict('http://www.sockshare.com/file/3A6FF548272EA378', function (err, data) {
    if (err) {
        console.log('Something went wrong!', err);
    } else {
        console.log(data);
    }
});

Example output:

{ 
    error: 0,
    file_name: '01ElIVX.png',
    file_size: '3.93MB',
    file_size_bytes: '4120903',
    generated_links: [
        ['01ElIVX.png', '', 'http://jodoc.real-debrid.com/dl/*************/01ElIVX.png']
    ],
    main_link: 'http://jodoc.real-debrid.com/dl/*************/01ElIVX.png',
    link: 'http://www.sockshare.com/file/3A6FF548272EA378',
    hoster_name: 'Sockshare',
    hoster_url: 'sockshare.com',
    hoster_image: 'sockshare.png',
    max_chunks: '-1',
    media_keys: false,
    swap: false
}

realdebrid.getValidHosters(callback)

Get all valid hosters that are supported by real-debrid.com. callback takes two arguments, err and data.

realdebrid.getValidHosters(function (err, data) {
    if (err) {
        console.log('Something went wrong!', err);
    } else {
        console.log(data);
    }
});

Example output:

["1fichier.com","desfichiers.com","dfichiers.com","1st-files.com","2shared.com","4shared.com","allmyvideos.net","asfile.com","bayfiles.com","beststreams.net","bitshare.com","canalplus.fr","catshare.net","cbs.com","crocko.com","cwtv.com","datafile.com","datafilehost.com","datei.to","ddlstorage.com","depfile.com","i-filez.com","divxstage.eu","dizzcloud.com","dl.free.fr","easybytez.com","extmatrix.com","filecloud.io","filefactory.com","fileflyer.com","filemonkey.in","fileom.com","fileover.net","fileparadox.in","filepost.com","filerio.com","filesabc.com","filesflash.com","filesflash.net","filesmonster.com","fileswap.com","putlocker.com","firedrive.com","freakshare.net","gigapeta.com","gigasize.com","gulfup.com","hugefiles.net","hulkshare.com","hulu.com","jumbofiles.com","junocloud.me","keep2share.cc","k2s.cc","keep2s.cc","k2share.cc","letitbit.net","load.to","luckyshare.net","mediafire.com","mega.co.nz","megashares.com","mixturevideo.com","mixturecloud.com","movshare.net","netload.in","novamov.com","nowdownload.eu","nowdownload.ch","nowdownload.sx","nowdownload.ag","nowdownload.at","nowvideo.eu","nowvideo.ch","nowvideo.sx","nowvideo.ag","nowvideo.at","oboom.com","purevid.com","rapidgator.net","rg.to","rapidshare.com","rarefile.net","redbunker.net","redtube.com","rutube.ru","scribd.com","secureupload.eu","sendspace.com","share-online.biz","shareflare.net","sky.fm","sockshare.com","soundcloud.com","speedyshare.com","lumfile.com","terafile.co","turbobit.net","tusfiles.net","ulozto.net","ultramegabit.com","unibytes.com","uploadable.ch","uploadc.com","uploaded.to","uploaded.net","ul.to","uploadhero.co","uploadhero.com","uploading.com","uploadlux.com","upstore.net","uptobox.com","userporn.com","veevr.com","vimeo.com","vip-file.com","wat.tv","youporn.com","youtube.com","yunfile.com","zippyshare.com"]