mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-03-11 21:26:53 +00:00
encode slug ondebaixa
This commit is contained in:
parent
f2604aed6d
commit
d2b01e7727
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ function torrent(torrentId, config = {}, retries = 2) {
|
|||
if (!torrentId || retries === 0) {
|
||||
return Promise.reject(new Error(`Failed ${torrentId} query`));
|
||||
}
|
||||
const slug = torrentId.split("/")[3];
|
||||
const slug = encodeURIComponent(torrentId.split("/")[3]);
|
||||
return singleRequest(`${baseUrl}/${slug}/`, config)
|
||||
.then((body) => parseTorrentPage(body))
|
||||
.then((torrent) => torrent.map(el => ({ torrentId: slug, ...el })))
|
||||
|
|
|
|||
Loading…
Reference in a new issue