refactors scrapers and add kat and unofficial tpb dump scraper

This commit is contained in:
TheBeastLT
2020-02-23 21:10:35 +01:00
parent 30421815d7
commit 0f91c98b84
14 changed files with 403 additions and 114 deletions

View File

@@ -2,16 +2,17 @@ require('dotenv').config();
const express = require("express");
const server = express();
const { connect } = require('./lib/repository');
const thepiratebayScraper = require('./scrapers/thepiratebay/thepiratebay_scraper');
const thepiratebayScraper = require('./scrapers/thepiratebay/thepiratebay_dump_scraper');
const horribleSubsScraper = require('./scrapers/horriblesubs/horriblesubs_scraper');
const thepiratebayDumpScraper = require('./scrapers/thepiratebay/thepiratebay_unofficial_dump_scraper');
const providers = [horribleSubsScraper];
const providers = [thepiratebayDumpScraper];
async function scrape() {
providers.forEach((provider) => provider.scrape());
}
server.post('/scrape', function(req, res) {
server.post('/scrape', function (req, res) {
scrape();
res.send(200);
});