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>
<div
:title="title"
:class="{ active }"
class="icon"
v-html="svg"

View File

@ -32,8 +32,8 @@
rel="noopener noreferrer"
class="tidbit date"
>
<span class="showable">{{ formatDate(release.date, 'MMM D, YYYY') }}</span>
<span class="hideable">{{ formatDate(release.date, 'MMMM D, YYYY') }}</span>
<span class="showable">{{ formatDate(release.date, 'MMM D, YYYY', release.datePrecision) }}</span>
<span class="hideable">{{ formatDate(release.date, 'MMMM D, YYYY', release.datePrecision) }}</span>
<Icon
v-if="release.url"
@ -97,7 +97,21 @@
<div class="info column">
<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
@ -388,7 +402,22 @@ export default {
}
.title {
display: inline-block;
margin: 0;
.icon {
fill: var(--shadow);
padding: .25rem;
&:hover {
fill: var(--primary);
cursor: pointer;
}
}
}
.title-composed {
color: var(--shadow);
}
.title-shoot {

View File

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

View File

@ -51,10 +51,16 @@
class="row link"
>
<h3
v-if="release.title"
v-tooltip.top="release.title"
:title="release.title"
class="title"
>{{ 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>
<span class="row">
@ -209,6 +215,10 @@ export default {
overflow: hidden;
}
.title-composed {
color: var(--shadow);
}
.network {
color: #555;
margin: 0 .25rem 0 0;

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
<!-- Generated by IcoMoon.io -->
<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>
</svg>

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 298 B

View File

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

View File

@ -13,6 +13,20 @@ import '../css/style.scss';
import Container from '../components/container/container.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() {
const store = initStore(router);
@ -37,7 +51,7 @@ function init() {
},
},
methods: {
formatDate: (date, format) => dayjs(date).format(format),
formatDate,
isAfter: (dateA, dateB) => dayjs(dateA).isAfter(dateB),
isBefore: (dateA, dateB) => dayjs(dateA).isBefore(dateB),
},

View File

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

View File

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

View File

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

View File

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

View File

@ -6,13 +6,19 @@ const argv = require('./argv');
const logger = require('./logger')(__filename);
const knex = require('./knex');
const slugify = require('./utils/slugify');
const formatDate = require('./utils/qu');
const { associateActors, scrapeActors } = require('./actors');
const { associateReleaseTags } = require('./tags');
const { curateEntity } = require('./entities');
const { associateReleaseMedia } = require('./media');
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,
limit: config.titleSlugLength,
});
@ -25,6 +31,7 @@ function curateReleaseEntry(release, batchId, existingRelease) {
shoot_id: release.shootId || null,
url: release.url,
date: Number(release.date) ? release.date : null,
date_precision: release.datePrecision,
slug,
description: release.description,
duration: release.duration,

View File

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