Improved scraping and association behavior.

This commit is contained in:
2019-11-19 04:36:15 +01:00
parent 7e9fd19c2a
commit 3ec7b15886
10 changed files with 166 additions and 94 deletions

View File

@@ -6,7 +6,7 @@ const initServer = require('./web/server');
const scrapeSites = require('./scrape-sites');
const scrapeRelease = require('./scrape-release');
const { scrapeActors } = require('./actors');
const { scrapeActors, scrapeBasicActors } = require('./actors');
async function init() {
if (argv.url) {
@@ -24,13 +24,20 @@ async function init() {
return;
}
if (argv.actors) {
if (argv.actors && argv.actors.length > 0) {
await scrapeActors();
knex.destroy();
return;
}
if (argv.actors) {
await scrapeBasicActors();
knex.destroy();
return;
}
await initServer();
}