![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
torrent-search-api-for-barbaroussa
Advanced tools
Yet another node torrent scraper based on x-ray for barbaroussa. (Support iptorrents, torrentleech, torrent9, Yyggtorrent, ThePiratebay, torrentz2, 1337x, KickassTorrent, Rarbg, TorrentProject, Yts, Limetorrents, Eztv)
Yet another node torrent search api based on x-ray for barbaroussa.
npm install torrent-search-api-for-barbaroussa
Search: search torrents on multiples providers.
Torrent details: get details about torrents (raw scraped html).
Download: download torrents files.
Easily extensible: you can easily add new providers and enjoy built-in features like cloudfare bypass.
const TorrentSearchApi = require('torrent-search-api');
TorrentSearchApi.enableProvider('Torrent9');
// Search '1080' in 'Movies' category and limit to 20 results
const torrents = await TorrentSearchApi.search('1080', 'Movies', 20);
// Get providers
const providers = TorrentSearchApi.getProviders();
// Get active providers
const activeProviders = TorrentSearchApi.getActiveProviders();
// providers
{
{
name: 'Torrent9',
public: true,
categories: ['All', 'Movies', 'TV', 'Music', 'Apps', 'Books', 'Top100']
},
{
name: 'IpTorrents',
public: false,
categories: ['All', 'Movies', 'TV', 'Games', 'Music']
},
...
}
// Enable public providers
TorrentSearchApi.enablePublicProviders();
// Enable public provider
TorrentSearchApi.enableProvider('Torrent9');
// Enable private provider with cookies
TorrentSearchApi.enableProvider('IpTorrents', ['uid=XXX;', 'pass=XXX;']);
// Enable private provider with credentials
TorrentSearchApi.enableProvider('IpTorrents', 'USERNAME', 'PASSWORD');
// Enable private provider with token
TorrentSearchApi.enableProvider('xxx', 'TOKEN');
// Disable provider
TorrentSearchApi.disableProvider('TorrentLeech');
// Disable all enabled providers
TorrentSearchApi.disableAllProviders();
TorrentSearchApi.isProviderActive('1337x');
The result is an array of torrents sorted by seeders with more or less properties depending on the provider.
// Search on actives providers
// Query: 1080
// Category: Movies (optional)
// Limit: 20 (optional)
const torrents = await TorrentSearchApi.search('1080', 'Movies', 20);
// Search with given providers
// query: 1080
// category: Movies (optional)
// limit: 20 (optional)
const torrents = await TorrentSearchApi.search(['IpTorrents', 'Torrent9'], '1080', 'Movies', 20);
// Get details (raw scraped html)
// torrent: taken from a search result
const torrentHtmlDetail = await TorrentSearchApi.getTorrentDetails(torrent);
// Get magnet url
// torrent: taken from a search result
const magnet = await TorrentSearchApi.getMagnet(torrent);
// Download a buffer
// torrent: taken from a search result
const buffer = await TorrentSearchApi.downloadTorrent(torrent);
// Download torrent and write it to the disk
// torrent: taken from a search result
await TorrentSearchApi.downloadTorrent(torrent, filnamePath);
You can code and add your custom providers (see provider definition format in existing providers) Don't forget to enable your provider if you intend to use it.
// load multipe providers
// from a TorrentProvider custom class definition or instance
const MyCustomProvider = require('./MyCustomProvider');
TorrentSearchApi.loadProvider(MyCustomProvider);
// from a provider object definition
TorrentSearchApi.loadProvider( {/* provider object definition */});
// from an absolute path to class definition or json object definition
const path = require('path');
const providerFullPath = path.join(__dirname, './lib/providers/MyCustomProvider');
TorrentSearchApi.loadProviders(providerFullPath);
// load multipe providers within a directory
// only absolute path are allowed
// it loads every *.json and *.js file
const path = require('path');
const providerDirFullPath = path.join(__dirname, './lib/providers/');
TorrentSearchApi.loadProviders(providerDirFullPath);
// load multipe providers
const MyCustomProvider = require('./MyCustomProvider');
TorrentSearchApi.loadProviders(MyCustomProvider, {/* provider object definition */}, ...);
// Remove provider
TorrentSearchApi.removeProvider('MyCustomProvider');
If you want to create an instance of the api without loading all the default providers and only load the ones that you want
// create instance
const createApi = require('torrent-search-api/createApi');
const TorrentSearchApi = createApi(/* same arguments as "loadProviders" method */)
Check "test/createProvider.test.js" file if you want to create a new provider.
Running tests command
npm run test:watch
// Fully or partial override of the provider config
TorrentSearchApi.overrideConfig(providerName, newConfig);
MIT © 2020 Jimmy Laurent
FAQs
Yet another node torrent scraper based on x-ray for barbaroussa. (Support iptorrents, torrentleech, torrent9, Yyggtorrent, ThePiratebay, torrentz2, 1337x, KickassTorrent, Rarbg, TorrentProject, Yts, Limetorrents, Eztv)
The npm package torrent-search-api-for-barbaroussa receives a total of 5 weekly downloads. As such, torrent-search-api-for-barbaroussa popularity was classified as not popular.
We found that torrent-search-api-for-barbaroussa demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.