add yts full scan scraper

This commit is contained in:
TheBeastLT
2022-02-18 19:41:01 +01:00
parent 3bc260ff5f
commit e71cce0be8
4 changed files with 29 additions and 10 deletions

View File

@@ -0,0 +1,15 @@
const moment = require("moment");
const yts = require('./yts_api');
const scraper = require('./yts_scraper')
async function scrape() {
const scrapeStart = moment();
console.log(`[${scrapeStart}] starting ${scraper.NAME} full scrape...`);
return yts.maxPage()
.then(maxPage => scraper.scrape(maxPage))
.then(() => console.log(`[${moment()}] finished ${scraper.NAME} full scrape`));
}
module.exports = { scrape, NAME: scraper.NAME };