Queueing and batching media HTTP requests for improved reliability.

This commit is contained in:
2020-02-22 03:22:30 +01:00
parent b2dfbac9e5
commit 349a5a506e
15 changed files with 251 additions and 78 deletions

View File

@@ -211,8 +211,13 @@ async function scrapeScene(html, url, site) {
release.title = $('.title_bar_hilite').text().trim();
const setIdIndex = html.indexOf('setid:"');
release.entryId = html.slice(setIdIndex, html.indexOf(',', setIdIndex)).match(/\d+/)[0];
const entryId = html.match(/showtagform\((\d+)\)/);
if (entryId) release.entryId = entryId[1];
else {
const setIdIndex = html.indexOf('setid:"');
if (setIdIndex) release.entryId = html.slice(setIdIndex, html.indexOf(',', setIdIndex)).match(/\d+/)[0];
}
const dateElement = $('.update_date').text().trim();
const dateComment = $('*')