Since few days, I have an issue when I use this (awesome) module with Yggtorrent website.
I use last (1.0.22
) version of torrent-search-api
like this :
const TorrentSearchApi = require('torrent-search-api');
// Yggtorrent connector
const torrentSearch = new TorrentSearchApi();
torrentSearch.enableProvider('Yggtorrent', 'USERNAME', 'PASSWORD');
torrent = {
title: 'Torrent title',
time: '3 heures',
seeds: 1,
peers: 62,
size: '1.06GB',
desc: 'https://yggtorrent.com/torrent/path/to/my/torrent',
provider: 'Yggtorrent'
}
path = '/home/kyane/code/autoratio/126363.torrent'
// Download the torrent
await torrentSearch.downloadTorrent(selectedTorrent, filePath)
.catch(err => {
console.log(err);
});
But when I run the script, I always have this stacktrace, I don't understand what's wrong
Error: To perform request, define both url and callback
at performRequest (/home/kyane/code/autoratio/node_modules/cloudscraper/index.js:80:11)
at cloudscraper.request (/home/kyane/code/autoratio/node_modules/cloudscraper/index.js:61:3)
at tryCatcher (/home/kyane/code/autoratio/node_modules/bluebird/js/release/util.js:16:23)
at ret (eval at makeNodePromisifiedEval (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
at ensureLoginPromise.then (/home/kyane/code/autoratio/node_modules/torrent-search-api/lib/torrent-provider.js:190:42)
at tryCatcher (/home/kyane/code/autoratio/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:638:18)
at Promise._resolveCallback (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:432:57)
at Promise._settlePromiseFromHandler (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:524:17)
at Promise._settlePromise (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/home/kyane/code/autoratio/node_modules/bluebird/js/release/promise.js:638:18)
at /home/kyane/code/autoratio/node_modules/bluebird/js/release/nodeback.js:42:21
at giveResults (/home/kyane/code/autoratio/node_modules/cloudscraper/index.js:244:5)
at Request._callback (/home/kyane/code/autoratio/node_modules/cloudscraper/index.js:109:7)
at Request.self.callback (/home/kyane/code/autoratio/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)