mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-03-11 17:15:37 +00:00
[scraper] retrieve latest entries in sequence
This commit is contained in:
parent
b6e2fceeee
commit
b05d4dee33
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const cheerio = require('cheerio');
|
||||
const needle = require('needle');
|
||||
const moment = require('moment');
|
||||
const Promises = require('../../lib/promises');
|
||||
|
||||
const defaultUrl = 'https://horriblesubs.info';
|
||||
const defaultTimeout = 10000;
|
||||
|
|
@ -33,7 +34,7 @@ async function showData(showInfo, config = {}) {
|
|||
|
||||
async function getLatestEntries(config = {}) {
|
||||
return _getAllLatestEntries(config)
|
||||
.then((entries) => Promise.all(entries.map((entry) => _findLatestEntry(entry, config))))
|
||||
.then((entries) => Promises.sequence(entries.map((entry) => () => _findLatestEntry(entry, config))))
|
||||
.then((entries) => entries.filter((entry) => entry))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue