[scraper] encode uri component for kitsu id query

This commit is contained in:
TheBeastLT
2020-12-19 14:52:12 +01:00
parent 910027358e
commit b39e54e2e0
5 changed files with 7 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ async function scrapeLatestTorrents() {
async function scrapeLatestTorrentsForCategory(category, page = 1) {
console.log(`Scrapping ${NAME} ${category} category page ${page}`);
return nyaasi.browse(({ page }))
return nyaasi.browse({ page, sort: 'id' })
.catch(error => {
console.warn(`Failed ${NAME} scrapping for [${page}] ${category} due: `, error);
return Promise.resolve([]);

View File

@@ -48,7 +48,7 @@ async function scrapeLatestTorrents() {
async function scrapeLatestTorrentsForCategory(category, page = 1) {
console.log(`Scrapping ${NAME} ${category} category page ${page}`);
return thepiratebay.browse(({ category, page }))
return thepiratebay.browse({ category, page })
.catch(error => {
console.warn(`Failed ${NAME} scrapping for [${page}] ${category} due: `, error);
return Promise.resolve([]);