update 1337x doc type
This commit is contained in:
@@ -92,7 +92,7 @@ async function processTorrentRecord(record) {
|
||||
function typeMapping() {
|
||||
const mapping = {};
|
||||
mapping[leetx.Categories.MOVIE] = Type.MOVIE;
|
||||
mapping[leetx.Categories.DOCUMENTARIES] = Type.SERIES;
|
||||
mapping[leetx.Categories.DOCUMENTARIES] = Type.MOVIE;
|
||||
mapping[leetx.Categories.TV] = Type.SERIES;
|
||||
mapping[leetx.Categories.ANIME] = Type.ANIME;
|
||||
return mapping;
|
||||
|
||||
@@ -35,7 +35,7 @@ function torrent(torrentId) {
|
||||
}
|
||||
|
||||
function search(query) {
|
||||
return si.search(query)
|
||||
return si.search(query, null, { category: Categories.ANIME.ENGLISH})
|
||||
.then(results => results.map(torrent => parseTorrent(torrent)));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ async function scrape() {
|
||||
// return Promise.all(ids.map(id => limiter.schedule(() => nyaasi.torrent(id)
|
||||
// .then(torrent => processTorrentRecord(torrent)))))
|
||||
// .then(() => console.log(`[${moment()}] finished ${NAME} scrape`));
|
||||
// const queries = ['Sagrada Reset', 'Sakurada Reset'];
|
||||
// return Promise.all(queries.map(query => limiter.schedule(() => nyaasi.search(query)
|
||||
// .then(torrents => Promise.all(torrents.map(torrent => limiter.schedule(() => processTorrentRecord(torrent))))))))
|
||||
// .then(() => console.log(`[${moment()}] finished ${NAME} scrape`));
|
||||
return scrapeLatestTorrents()
|
||||
.then(() => {
|
||||
lastScrape.lastScraped = scrapeStart;
|
||||
|
||||
Reference in New Issue
Block a user