Added date precision. Added Teen Core Club update scraper.

This commit is contained in:
ThePendulum 2020-07-03 04:12:56 +02:00
parent 945c2c45ce
commit 48a127409e
17 changed files with 207 additions and 27 deletions

View File

@ -1,6 +1,5 @@
<template> <template>
<div <div
:title="title"
:class="{ active }" :class="{ active }"
class="icon" class="icon"
v-html="svg" v-html="svg"

View File

@ -32,8 +32,8 @@
rel="noopener noreferrer" rel="noopener noreferrer"
class="tidbit date" class="tidbit date"
> >
<span class="showable">{{ formatDate(release.date, 'MMM D, YYYY') }}</span> <span class="showable">{{ formatDate(release.date, 'MMM D, YYYY', release.datePrecision) }}</span>
<span class="hideable">{{ formatDate(release.date, 'MMMM D, YYYY') }}</span> <span class="hideable">{{ formatDate(release.date, 'MMMM D, YYYY', release.datePrecision) }}</span>
<Icon <Icon
v-if="release.url" v-if="release.url"
@ -97,7 +97,21 @@
<div class="info column"> <div class="info column">
<div class="row"> <div class="row">
<h2 class="title">{{ release.title }}</h2> <h2
v-if="release.title"
class="title"
>{{ release.title }}</h2>
<h2
v-if="release.actors.length > 0"
class="title title-composed"
>
{{ release.actors.map(actor => actor.name).join(', ') }} for {{ release.entity.name }}
<Icon
v-tooltip="`This scene has no known official title`"
icon="question2"
/>
</h2>
</div> </div>
<div <div
@ -388,7 +402,22 @@ export default {
} }
.title { .title {
display: inline-block;
margin: 0; margin: 0;
.icon {
fill: var(--shadow);
padding: .25rem;
&:hover {
fill: var(--primary);
cursor: pointer;
}
}
}
.title-composed {
color: var(--shadow);
} }
.title-shoot { .title-shoot {

View File

@ -43,7 +43,7 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class="date" class="date"
>{{ formatDate(release.date, 'MMMM D, YYYY') }}</a> >{{ formatDate(release.date, 'MMMM D, YYYY', release.datePrecision) }}</a>
<a <a
v-else v-else

View File

@ -51,10 +51,16 @@
class="row link" class="row link"
> >
<h3 <h3
v-if="release.title"
v-tooltip.top="release.title" v-tooltip.top="release.title"
:title="release.title" :title="release.title"
class="title" class="title"
>{{ release.title }}</h3> >{{ release.title }}</h3>
<h3
v-else-if="release.actors.length > 0"
class="title title-composed"
>{{ release.actors[0].name }} for {{ release.entity.name }}</h3>
</a> </a>
<span class="row"> <span class="row">
@ -209,6 +215,10 @@ export default {
overflow: hidden; overflow: hidden;
} }
.title-composed {
color: var(--shadow);
}
.network { .network {
color: #555; color: #555;
margin: 0 .25rem 0 0; margin: 0 .25rem 0 0;

View File

@ -250,11 +250,9 @@ export default {
padding: 1rem .5rem 1rem 2rem; padding: 1rem .5rem 1rem 2rem;
} }
/*
@media(max-width: $breakpoint) { @media(max-width: $breakpoint) {
.scroll-button { .scroll-button {
display: none; display: none;
} }
} }
*/
</style> </style>

View File

@ -83,12 +83,15 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 1rem; padding: 0 0 0 1rem;
.photo-link {
margin: 0 .5rem .5rem 0;
}
.poster, .poster,
.photo { .photo {
height: 18rem; max-height: 18rem;
margin: 0 .5rem .5rem 0;
} }
} }
} }
@ -99,7 +102,8 @@ export default {
.poster, .poster,
.photo { .photo {
height: 15rem; max-height: 15rem;
max-width: 100%;
box-shadow: 0 0 3px var(--shadow-weak); box-shadow: 0 0 3px var(--shadow-weak);
} }
</style> </style>

View File

@ -144,8 +144,4 @@ export default {
padding: 0 1rem 1rem 1rem; padding: 0 1rem 1rem 1rem;
line-height: 1.5; line-height: 1.5;
} }
.dark .sidebar {
border-right: solid 1px var(--shadow-hint);
}
</style> </style>

View File

@ -10,7 +10,7 @@
} }
&:not(.popover) .tooltip-inner { &:not(.popover) .tooltip-inner {
padding: .25rem .5rem; padding: .5rem 1rem;
} }
.tooltip-arrow { .tooltip-arrow {

View File

@ -1,5 +1,4 @@
<!-- Generated by IcoMoon.io --> <!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<title>question2</title>
<path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.418 0 8-3.582 8-8s-3.582-8-8-8zM9 13h-2v-2h2v2zM12 8l-3 2h-2v-1l3-2v-1h-5v-2h6c0.552 0 1 0.448 1 1v3z"></path> <path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.418 0 8-3.582 8-8s-3.582-8-8-8zM9 13h-2v-2h2v2zM12 8l-3 2h-2v-1l3-2v-1h-5v-2h6c0.552 0 1 0.448 1 1v3z"></path>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 298 B

View File

@ -169,6 +169,7 @@ const releaseFields = `
id id
title title
date date
datePrecision
slug slug
type type
shootId shootId
@ -235,6 +236,7 @@ const releaseFragment = `
title title
description description
date date
datePrecision
duration duration
createdAt createdAt
shootId shootId

View File

@ -13,6 +13,20 @@ import '../css/style.scss';
import Container from '../components/container/container.vue'; import Container from '../components/container/container.vue';
import Icon from '../components/icon/icon.vue'; import Icon from '../components/icon/icon.vue';
function formatDate(date, format = 'MMMM D, YYYY', precision = 'day') {
if (precision === 'year') {
const newFormat = format.match(/Y+/);
return dayjs(date).format(newFormat ? newFormat[0] : 'YYYY');
}
if (precision === 'month') {
const newFormat = format.match(/(M{1,4})|(Y{2,4})/g);
return dayjs(date).format(newFormat ? newFormat.join(' ') : 'MMMM YYYY');
}
return dayjs(date).format(format);
}
function init() { function init() {
const store = initStore(router); const store = initStore(router);
@ -37,7 +51,7 @@ function init() {
}, },
}, },
methods: { methods: {
formatDate: (date, format) => dayjs(date).format(format), formatDate,
isAfter: (dateA, dateB) => dayjs(dateA).isAfter(dateB), isAfter: (dateA, dateB) => dayjs(dateA).isAfter(dateB),
isBefore: (dateA, dateB) => dayjs(dateA).isBefore(dateB), isBefore: (dateA, dateB) => dayjs(dateA).isBefore(dateB),
}, },

View File

@ -615,6 +615,9 @@ exports.up = knex => Promise.resolve()
table.date('date'); table.date('date');
table.index('date'); table.index('date');
table.enum('date_precision', ['year', 'month', 'day', 'hour', 'minute', 'second'])
.defaultTo('day');
table.date('production_date'); table.date('production_date');
table.text('description'); table.text('description');

View File

@ -370,8 +370,8 @@ const networks = [
}, },
{ {
slug: 'teencoreclub', slug: 'teencoreclub',
name: 'https://teencoreclub.com', name: 'Teen Core Club',
url: 'https://www.twistys.com', url: 'https://teencoreclub.com',
}, },
{ {
slug: 'twistys', slug: 'twistys',

View File

@ -5731,184 +5731,300 @@ const sites = [
{ {
name: 'AssTeenMouth', name: 'AssTeenMouth',
slug: 'assteenmouth', slug: 'assteenmouth',
url: 'https://assteenmouth.com',
parent: 'teencoreclub', parent: 'teencoreclub',
parameters: {
siteId: '180',
},
}, },
{ {
name: 'Bang Teen Pussy', name: 'Bang Teen Pussy',
slug: 'bangteenpussy', slug: 'bangteenpussy',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://bangteenpussy.com',
parameters: {
siteId: '182',
},
}, },
{ {
name: 'Analyzed Girls', name: 'Analyzed Girls',
slug: 'analyzedgirls', slug: 'analyzedgirls',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://analyzedgirls.com',
parameters: {
siteId: '178',
},
}, },
{ {
name: 'Brutal Invasion', name: 'Brutal Invasion',
slug: 'brutalinvasion', slug: 'brutalinvasion',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://brutalinvasion.com',
parameters: {
siteId: '184',
},
}, },
{ {
name: 'Cumaholic Teens', name: 'Cumaholic Teens',
alias: ['cumoholic teens', 'cumoholicteens'], alias: [
'cumoholic teens',
'cumoholicteens',
],
slug: 'cumaholicteens', slug: 'cumaholicteens',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://cumaholicteens.com',
parameters: {
siteId: '186',
},
}, },
{ {
name: 'Defiled 18', name: 'Defiled 18',
slug: 'defiled18', slug: 'defiled18',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://defiled18.com',
parameters: {
siteId: '188',
},
}, },
{ {
name: 'Double Teamed Teens', name: 'Double Teamed Teens',
slug: 'doubleteamedteens', slug: 'doubleteamedteens',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://doubleteamedteens.com',
parameters: {
siteId: '190',
},
}, },
{ {
name: 'Dreams HD', name: 'Dreams HD',
slug: 'dreamshd', slug: 'dreamshd',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://dreamshd.com',
parameters: {},
}, },
{ {
name: 'Girls Got Cream', name: 'Girls Got Cream',
slug: 'girlsgotcream', slug: 'girlsgotcream',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://girlsgotcream.com',
parameters: {
siteId: '194',
},
}, },
{ {
name: 'Hardcore Youth', name: 'Hardcore Youth',
slug: 'hardcoreyouth', slug: 'hardcoreyouth',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://hardcoreyouth.com',
parameters: {
siteId: '196',
},
}, },
{ {
name: 'Little Hellcat', name: 'Little Hellcat',
slug: 'littlehellcat', slug: 'littlehellcat',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://littlehellcat.com',
parameters: {
siteId: '198',
},
}, },
{ {
name: 'Make Teen Gape', name: 'Make Teen Gape',
slug: 'maketeengape', slug: 'maketeengape',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://maketeengape.com',
parameters: {
siteId: '200',
},
}, },
{ {
name: 'Nylon Sweeties', name: 'Nylon Sweeties',
slug: 'nylonsweeties', slug: 'nylonsweeties',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://nylonsweeties.com',
parameters: {
siteId: '202',
},
}, },
{ {
name: 'Seductive 18', name: 'Seductive 18',
slug: 'seductive18', slug: 'seductive18',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://seductive18.com',
parameters: {
siteId: '204',
},
}, },
{ {
name: 'Teen Anal Casting', name: 'Teen Anal Casting',
slug: 'teenanalcasting', slug: 'teenanalcasting',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teenanalcasting.com',
parameters: {
siteId: '206',
},
}, },
{ {
name: 'Teen Drillers', name: 'Teen Drillers',
slug: 'teendrillers', slug: 'teendrillers',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teendrillers.com',
parameters: {
siteId: '208',
},
}, },
{ {
name: 'Teens Natural Way', name: 'Teens Natural Way',
slug: 'teensnaturalway', slug: 'teensnaturalway',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teensnaturalway.com',
parameters: {
siteId: '212',
},
}, },
{ {
name: 'Teens Try Blacks', name: 'Teens Try Blacks',
slug: 'teenstryblacks', slug: 'teenstryblacks',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teenstryblacks.com',
parameters: {
siteId: '214',
},
}, },
{ {
name: 'Spermantino', name: 'Spermantino',
slug: 'spermantino', slug: 'spermantino',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://spermantino.com',
parameters: {
siteId: '366',
},
}, },
{ {
name: 'Teach My Ass', name: 'Teach My Ass',
slug: 'teachmyass', slug: 'teachmyass',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teachmyass.com',
parameters: {
siteId: '368',
},
}, },
{ {
name: 'Nightclub', name: 'Nightclub',
slug: 'nightclub', slug: 'nightclub',
parent: 'teencoreclub', parent: 'teencoreclub',
}, url: 'https://nightclub.com',
{ parameters: {},
name: 'Let\'s Go Dirty',
slug: 'letsgodirty',
parent: 'teencoreclub',
}, },
{ {
name: 'Nightclub Live', name: 'Nightclub Live',
slug: 'nightclublive', slug: 'nightclublive',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://nightclublive.com',
parameters: {},
}, },
{ {
name: 'Drilled Chicks', name: 'Drilled Chicks',
slug: 'drilledchicks', slug: 'drilledchicks',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://drilledchicks.com',
parameters: {},
}, },
{ {
name: 'Anal Checkups', name: 'Anal Checkups',
slug: 'analcheckups', slug: 'analcheckups',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://analcheckups.com',
parameters: {},
}, },
{ {
name: 'Fab Sluts', name: 'Fab Sluts',
slug: 'fabsluts', slug: 'fabsluts',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://fabsluts.com',
parameters: {},
}, },
{ {
name: 'Jerk-Off Pass', name: 'Jerk-Off Pass',
slug: 'jerkoffpass', slug: 'jerkoffpass',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://jerkoffpass.com',
parameters: {},
}, },
{ {
name: 'Nylon Spunk Junkies', name: 'Nylon Spunk Junkies',
slug: 'nylonspunkjunkies', slug: 'nylonspunkjunkies',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://nylonspunkjunkies.com',
parameters: {},
}, },
{ {
name: 'She Got Six', name: 'She Got Six',
slug: 'shegotsix', slug: 'shegotsix',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://shegotsix.com',
parameters: {},
}, },
{ {
name: 'Spear Teen Pussy', name: 'Spear Teen Pussy',
slug: 'spearteenpussy', slug: 'spearteenpussy',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://spearteenpussy.com',
parameters: {},
}, },
{ {
name: 'Teen Core Club', name: 'Teen Core Club',
slug: 'teencoreclub', slug: 'teencoreclub',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teencoreclub.com',
parameters: {},
}, },
{ {
name: 'Teen Core Zine', name: 'Teen Core Zine',
slug: 'teencorezine', slug: 'teencorezine',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teencorezine.com',
parameters: {},
}, },
{ {
name: 'Teens Go Porn', name: 'Teens Go Porn',
slug: 'teensgoporn', slug: 'teensgoporn',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://teensgoporn.com',
parameters: {},
}, },
{ {
name: 'We Need New Talents', name: 'We Need New Talents',
slug: 'weneednewtalents', slug: 'weneednewtalents',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://weneednewtalents.com',
parameters: {},
}, },
{ {
name: 'X Core Club', name: 'X Core Club',
slug: 'xcoreclub', slug: 'xcoreclub',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://xcoreclub.com',
parameters: {},
}, },
{ {
name: 'Young Throats', name: 'Young Throats',
slug: 'youngthroats', slug: 'youngthroats',
parent: 'teencoreclub', parent: 'teencoreclub',
url: 'https://youngthroats.com',
parameters: {
siteId: '220',
},
}, },
/* VOD service
{
name: "Let's Go Dirty",
slug: 'letsgodirty',
parent: 'teencoreclub',
url: 'https://letsgodirty.com',
},
*/
// TWISTYS // TWISTYS
{ {
name: 'Twistys', name: 'Twistys',

View File

@ -51,6 +51,7 @@ const score = require('./score');
const sextreme = require('./21sextreme'); const sextreme = require('./21sextreme');
const sextury = require('./21sextury'); const sextury = require('./21sextury');
const teamskeet = require('./teamskeet'); const teamskeet = require('./teamskeet');
const teencoreclub = require('./teencoreclub');
const transangels = require('./transangels'); const transangels = require('./transangels');
const twistys = require('./twistys'); const twistys = require('./twistys');
const vivid = require('./vivid'); const vivid = require('./vivid');
@ -121,6 +122,7 @@ module.exports = {
score, score,
sexyhub: mindgeek, sexyhub: mindgeek,
swallowsalon: julesjordan, swallowsalon: julesjordan,
teencoreclub,
teamskeet, teamskeet,
twistys, twistys,
vivid, vivid,

View File

@ -6,13 +6,19 @@ const argv = require('./argv');
const logger = require('./logger')(__filename); const logger = require('./logger')(__filename);
const knex = require('./knex'); const knex = require('./knex');
const slugify = require('./utils/slugify'); const slugify = require('./utils/slugify');
const formatDate = require('./utils/qu');
const { associateActors, scrapeActors } = require('./actors'); const { associateActors, scrapeActors } = require('./actors');
const { associateReleaseTags } = require('./tags'); const { associateReleaseTags } = require('./tags');
const { curateEntity } = require('./entities'); const { curateEntity } = require('./entities');
const { associateReleaseMedia } = require('./media'); const { associateReleaseMedia } = require('./media');
function curateReleaseEntry(release, batchId, existingRelease) { function curateReleaseEntry(release, batchId, existingRelease) {
const slug = slugify(release.title || release.actors?.join('-') || null, '-', { const slugBase = release.title
|| (release.actors?.length && `${release.entity.slug} ${release.actors.map(actor => actor.name).join(' ')}`)
|| (release.date && `${release.entity.slug} ${formatDate('YYYY MM DD')}`)
|| null;
const slug = slugify(slugBase, '-', {
encode: true, encode: true,
limit: config.titleSlugLength, limit: config.titleSlugLength,
}); });
@ -25,6 +31,7 @@ function curateReleaseEntry(release, batchId, existingRelease) {
shoot_id: release.shootId || null, shoot_id: release.shootId || null,
url: release.url, url: release.url,
date: Number(release.date) ? release.date : null, date: Number(release.date) ? release.date : null,
date_precision: release.datePrecision,
slug, slug,
description: release.description, description: release.description,
duration: release.duration, duration: release.duration,

View File

@ -341,5 +341,6 @@ module.exports = {
ctxa: initAll, ctxa: initAll,
geta: getAll, geta: getAll,
qu: quFuncs, qu: quFuncs,
prefixUrl,
...legacyFuncs, ...legacyFuncs,
}; };