JimmyLaurent / torrent-search-api

Yet another node torrent scraper (supports iptorrents, torrentleech, torrent9, torrentz2, 1337x, thepiratebay, Yggtorrent, TorrentProject, Eztv, Yts, LimeTorrents)
MIT License
395 stars 100 forks source link

Error in searching torrents #131

Open TheRamann opened 3 years ago

TheRamann commented 3 years ago

Error

The npm module was working perfectly until a week ago when I started getting an error

TypeError: response.body.map is not a function
    at ThePirateBay.search (D:\Desktop\NodeJS\Easy-Torrent\node_modules\torrent-search-api\lib\providers\thepiratebay.js:48:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Promise.all (index 0)

Expected solution

I suspect that the error is created from here https://github.com/JimmyLaurent/torrent-search-api/blob/872e14d7acf801d7441d2d1a9576e7987664e50e/lib/providers/thepiratebay.js#L48

Steps to reproduce the error

The error is produced in here https://github.com/TheRamann/Easy-Torrent/blob/main/index.js

Device Used

damain commented 3 years ago

+1 I also see this error