Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    miraclespublic

    node-miracles

    Miracles is an event-based magnet link parser for node

    Installation

    npm install miracles

    Usage

    var miracles = require('miracles');
     
    var tpbDocumentary = miracles('magnet:?xt=urn:btih:79816060ea56d56f2a2148cd45705511079f9bca&dn=TPB.AFK.2013.720p.h264-SimonKlose&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80');
     
    tpbDocumentary.on('root', function(){
        console.log('begining parsing...');
    });
     
    tpbDocumentary.on('completed', function(parsed){
        console.log(parsed);
    });
     
    // address /tr/acker paremeter 
    tpbDocumentary.on('tr', function(address){
        console.log('encountered tracker:', address);
    });

    Notes

    Refer to the official website for the magnet-uri project, the Wikipedia article, and more directly, the specification for more information on parameters and whatnot.

    Keywords

    none

    install

    npm i miracles

    Downloadsweekly downloads

    5

    version

    0.0.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar