node-red-contrib-torrent-search-api
Provide a node to call torrent-search-api methods, see here https://www.npmjs.com/package/torrent-search-api The node is "persistent", meaning you can configure it with multiple successive messages (enable providers, then make a search...)
torrent-search-api node
You only need to provde 2 parameters in the payload of your messages:
- method : any function of the torrent-search-api module
- args : an array of parameters to be passed to the method (first element is the first parameter of the function, etc...)
Examples
//this will enable provider 1337x for the node payload: method: 'enableProvider' args: '1337x' //if sent to the same node, this will then fetch 10 torrents in category "Movies" from provider "1337x" with search term "Avengers" payload: method: 'search' args: 'Avengers''Movies'10 //Once you have torrents results from your search, you can get the magnet url payload: method: 'getMagnet' args: torrent
An example of flow in node-red which does a search based on terms and provideres list, then return torrents WITH their magnets url. Results:
array 0: object title: "Fear the Walking Dead S04E16 HDTV x264-SVA [eztv]" time: "Oct. 1st '18" seeds: 784 peers: 67 size: "319.5 MB" desc: "http://www.1337x.to/torrent/3262961/Fear-the-Walking-Dead-S04E16-HDTV-x264-SVA-eztv/" provider: "1337x" magnet: "magnet:?xt=urn:btih:D197D3853944F59303FDA26F7D6D10804650BAAF&dn=Fear+the+Walking+Dead+S04E16+HDTV+x264-SVA+%5Beztv%5D&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftorrent.gresille.org%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710%2Fannounce&tr=udp%3A%2F%2Fp4p.arenabg.com%3A1337&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce"...
Flow: In node-red, first install the module, copy the code below, then import the flow below (Import > from clipboard, then paste, click import).