Skipping Babel, updated node version. Improved deep scrape array merge.
This commit is contained in:
parent
ef1d34e4de
commit
ae0efccb04
|
@ -4,7 +4,7 @@
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node -r source-map-support/register dist/init.js",
|
"start": "node -r source-map-support/register src/init.js",
|
||||||
"webpack": "webpack --env=production --mode=production",
|
"webpack": "webpack --env=production --mode=production",
|
||||||
"webpack-dev": "webpack --env=development --mode=development",
|
"webpack-dev": "webpack --env=development --mode=development",
|
||||||
"webpack-watch": "webpack --progress --colors --watch --env=development --mode=development",
|
"webpack-watch": "webpack --progress --colors --watch --env=development --mode=development",
|
||||||
|
|
|
@ -5729,7 +5729,6 @@ const sites = [
|
||||||
name: 'Pinky XXX',
|
name: 'Pinky XXX',
|
||||||
slug: 'pinkyxxx',
|
slug: 'pinkyxxx',
|
||||||
url: 'https://pinkyxxx.com',
|
url: 'https://pinkyxxx.com',
|
||||||
independent: true,
|
|
||||||
},
|
},
|
||||||
// PORN CZ
|
// PORN CZ
|
||||||
{
|
{
|
||||||
|
|
|
@ -123,11 +123,15 @@ async function scrapeRelease(baseRelease, entities, type = 'scene') {
|
||||||
: await layoutScraper.fetchMovie(baseRelease.url, entity, baseRelease, include, null);
|
: await layoutScraper.fetchMovie(baseRelease.url, entity, baseRelease, include, null);
|
||||||
|
|
||||||
const mergedRelease = {
|
const mergedRelease = {
|
||||||
...merge(baseRelease, scrapedRelease),
|
...merge(baseRelease, scrapedRelease, {
|
||||||
|
dedupeStringsInArrayValues: true,
|
||||||
|
}),
|
||||||
deep: !!scrapedRelease,
|
deep: !!scrapedRelease,
|
||||||
entity,
|
entity,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(baseRelease, scrapedRelease, mergedRelease);
|
||||||
|
|
||||||
if (!mergedRelease.entryId) {
|
if (!mergedRelease.entryId) {
|
||||||
throw Object.assign(new Error('No entry ID supplied'), { code: 'NO_ENTRY_ID' });
|
throw Object.assign(new Error('No entry ID supplied'), { code: 'NO_ENTRY_ID' });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue