Added native site support to Perv City scraper for DP Diva.

This commit is contained in:
DebaucheryLibrarian 2022-07-10 01:57:24 +02:00
parent 96e094ee88
commit 01b37f087f
9 changed files with 30 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 KiB

View File

@ -1533,6 +1533,10 @@ const aliases = [
name: 'double anal (dap)', name: 'double anal (dap)',
for: 'dap', for: 'dap',
}, },
{
name: 'double anal penetration',
for: 'dap',
},
{ {
name: 'double anal penetration (dap)', name: 'double anal penetration (dap)',
for: 'dap', for: 'dap',
@ -1547,6 +1551,10 @@ const aliases = [
for: 'tvp', for: 'tvp',
secondary: true, secondary: true,
}, },
{
name: 'double vaginal penetration',
for: 'dvp',
},
{ {
name: 'double vaginal (dvp)', name: 'double vaginal (dvp)',
for: 'dvp', for: 'dvp',

View File

@ -6932,6 +6932,9 @@ const sites = [
url: 'http://dpdiva.com', url: 'http://dpdiva.com',
parent: 'pervcity', parent: 'pervcity',
tags: ['dp', 'anal'], tags: ['dp', 'anal'],
parameters: {
native: true,
},
}, },
// PIERRE WOODMAN // PIERRE WOODMAN
{ {

View File

@ -598,6 +598,7 @@ const tagMedia = [
['airtight', 7, 'Lana Rhoades in "Gangbang Me 3"', 'hardx'], ['airtight', 7, 'Lana Rhoades in "Gangbang Me 3"', 'hardx'],
['airtight', 'hime_marie_blackedraw', 'Hime Marie', 'blackedraw'], ['airtight', 'hime_marie_blackedraw', 'Hime Marie', 'blackedraw'],
['airtight', 6, 'Remy Lacroix in "Ass Worship 14"', 'julesjordan'], ['airtight', 6, 'Remy Lacroix in "Ass Worship 14"', 'julesjordan'],
['airtight', 'yoha_boundgangbangs', 'Yoha in "Home Invasion"', 'boundgangbangs'],
['airtight', 'anissa_kate_legalporno', 'Anissa Kate in GP1962', 'analvids'], ['airtight', 'anissa_kate_legalporno', 'Anissa Kate in GP1962', 'analvids'],
['airtight', 'emily_willis_blacked', 'Emily Willis', 'blacked'], ['airtight', 'emily_willis_blacked', 'Emily Willis', 'blacked'],
['airtight', 'savannah_bond_julesjordan', 'Savannah Bond', 'julesjordan'], ['airtight', 'savannah_bond_julesjordan', 'Savannah Bond', 'julesjordan'],

View File

@ -43,7 +43,7 @@ function scrapeAll(scenes, entity) {
}); });
} }
function scrapeScene({ query }) { function scrapeScene({ query }, channel) {
const release = {}; const release = {};
release.entryId = query.q('.trailerLeft img', 'id').match(/set-target-(\d+)/)[1]; release.entryId = query.q('.trailerLeft img', 'id').match(/set-target-(\d+)/)[1];
@ -62,7 +62,7 @@ function scrapeScene({ query }) {
const trailer = query.q('script')?.textContent.match(/\/trailers\/.+\.mp4/)?.[0]; const trailer = query.q('script')?.textContent.match(/\/trailers\/.+\.mp4/)?.[0];
if (trailer) { if (trailer) {
release.trailer = `https://pervcity.com${trailer}`; release.trailer = `${channel.url}${trailer}`;
release.channel = channelCodes[release.trailer.match(channelRegExp)?.[0]]; release.channel = channelCodes[release.trailer.match(channelRegExp)?.[0]];
} }
@ -95,15 +95,28 @@ function scrapeProfile({ query }) {
return profile; return profile;
} }
async function fetchLatest(channel, page = 1) { function getLatestUrl(channel, page) {
if (channel.parameters?.siteId) { if (channel.parameters?.siteId) {
const url = `https://pervcity.com/search.php?site[]=${channel.parameters.siteId}&page=${page}`; return `https://pervcity.com/search.php?site[]=${channel.parameters.siteId}&page=${page}`;
}
if (channel.parameters?.native) {
return `${channel.url}/search.php?site[]=&page=${page}`;
}
return null;
}
async function fetchLatest(channel, page = 1) {
const url = getLatestUrl(channel, page);
if (url) {
const res = await qu.getAll(url, '.videoBlock'); const res = await qu.getAll(url, '.videoBlock');
return res.ok ? scrapeAll(res.items, channel) : res.status; return res.ok ? scrapeAll(res.items, channel) : res.status;
} }
return null; return [];
} }
async function fetchUpcoming(channel) { async function fetchUpcoming(channel) {