nyaa-ts
v1.0.2
Published
TypeScript client for searching Nyaa torrents
Downloads
67
Readme
nyaa-ts
TypeScript Wrapper for Nyaa Torrent website.
Mainly for searching animes directly via a wrapper to get the magnet. :)
Install
npm install nyaa-tsUsage
import NyaaClient from 'nyaa-ts';
const client = new NyaaClient();
client.search('frieren', {
limit: 5,
sort: 'seeders',
order: 'desc',
}).then(console.log).catch(console.error);Each result contains:
titlelinkmagnetLinkpubDatesizeseedersleechersdownloads
Options
limit: maximum number of results to returnsort:downloads,seeders,leechers,pubDate, orsizeorder:ascordesc
Notes
- If the webiste changes, this will break, and need a fix :/
- If your project uses ESM, top-level
awaitalso works.
