mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
refactors scrapers and add kat and unofficial tpb dump scraper
This commit is contained in:
7
index.js
7
index.js
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user