diff --git a/scraper/lib/torrent.js b/scraper/lib/torrent.js index 1db25d1..6c53370 100644 --- a/scraper/lib/torrent.js +++ b/scraper/lib/torrent.js @@ -113,12 +113,12 @@ async function filesFromTorrentFile(torrent) { return Promise.reject(new Error("no torrentLink")); } - return axios.get(torrent.torrentLink, { timeout: 10000 }) + return axios.get(torrent.torrentLink, { timeout: 10000, responseType: 'arraybuffer' }) .then((response) => { if (!response.data || response.status !== 200) { throw new Error('torrent not found') } - return response.body + return response.data }) .then((body) => parseTorrent(body)) .then((info) => info.files.map((file, fileId) => ({