Not parsing HTML with jsdom when using http module directly to save memory. Added loading ellipsis to release grid pages.
This commit is contained in:
parent
92f9ff4104
commit
6c5d4389fe
|
@ -361,7 +361,10 @@
|
||||||
:available-actors="actor.actors"
|
:available-actors="actor.actors"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Releases :releases="releases" />
|
<Releases
|
||||||
|
:releases="releases"
|
||||||
|
:done="done"
|
||||||
|
/>
|
||||||
|
|
||||||
<Pagination
|
<Pagination
|
||||||
:items-total="totalCount"
|
:items-total="totalCount"
|
||||||
|
@ -389,6 +392,8 @@ import Social from './social.vue';
|
||||||
import StashButton from '../stashes/button.vue';
|
import StashButton from '../stashes/button.vue';
|
||||||
|
|
||||||
async function fetchActor(scroll = true) {
|
async function fetchActor(scroll = true) {
|
||||||
|
this.done = false;
|
||||||
|
|
||||||
const { actor, releases, totalCount } = await this.$store.dispatch('fetchActorById', {
|
const { actor, releases, totalCount } = await this.$store.dispatch('fetchActorById', {
|
||||||
actorId: Number(this.$route.params.actorId),
|
actorId: Number(this.$route.params.actorId),
|
||||||
limit: this.limit,
|
limit: this.limit,
|
||||||
|
@ -400,6 +405,7 @@ async function fetchActor(scroll = true) {
|
||||||
this.releases = releases;
|
this.releases = releases;
|
||||||
this.totalCount = totalCount;
|
this.totalCount = totalCount;
|
||||||
this.stashedBy = actor.stashes;
|
this.stashedBy = actor.stashes;
|
||||||
|
this.done = true;
|
||||||
|
|
||||||
if (this.$refs.filter && scroll) {
|
if (this.$refs.filter && scroll) {
|
||||||
this.$refs.filter.$el.scrollIntoView();
|
this.$refs.filter.$el.scrollIntoView();
|
||||||
|
@ -463,6 +469,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
actor: null,
|
actor: null,
|
||||||
releases: null,
|
releases: null,
|
||||||
|
done: false,
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
pageTitle: null,
|
pageTitle: null,
|
||||||
|
|
|
@ -35,11 +35,11 @@
|
||||||
class="button button-primary"
|
class="button button-primary"
|
||||||
>Log in</button>
|
>Log in</button>
|
||||||
|
|
||||||
<router-link
|
<RouterLink
|
||||||
v-if="$store.state.auth.signup"
|
v-if="$store.state.auth.signup"
|
||||||
:to="{ name: 'signup', query: { ref: $route.query.ref } }"
|
:to="{ name: 'signup', query: { ref: $route.query.ref } }"
|
||||||
class="link link-external signup"
|
class="link link-external signup"
|
||||||
>Sign up</router-link>
|
>Sign up</RouterLink>
|
||||||
</template>
|
</template>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -43,11 +43,11 @@
|
||||||
class="button button-primary"
|
class="button button-primary"
|
||||||
>Sign up</button>
|
>Sign up</button>
|
||||||
|
|
||||||
<router-link
|
<RouterLink
|
||||||
v-if="$store.state.auth.login"
|
v-if="$store.state.auth.login"
|
||||||
:to="{ name: 'login', query: { ref: $route.query.ref } }"
|
:to="{ name: 'login', query: { ref: $route.query.ref } }"
|
||||||
class="link link-external login"
|
class="link link-external login"
|
||||||
>Log in</router-link>
|
>Log in</RouterLink>
|
||||||
</template>
|
</template>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -111,7 +111,10 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="releases">
|
<div class="releases">
|
||||||
<Releases :releases="entity.releases" />
|
<Releases
|
||||||
|
:releases="entity.releases"
|
||||||
|
:done="done"
|
||||||
|
/>
|
||||||
|
|
||||||
<Pagination
|
<Pagination
|
||||||
:items-total="totalCount"
|
:items-total="totalCount"
|
||||||
|
@ -134,6 +137,7 @@ import Scroll from '../scroll/scroll.vue';
|
||||||
import Campaign from '../campaigns/campaign.vue';
|
import Campaign from '../campaigns/campaign.vue';
|
||||||
|
|
||||||
async function fetchEntity(scroll = true) {
|
async function fetchEntity(scroll = true) {
|
||||||
|
this.done = false;
|
||||||
this.entityUrl = null;
|
this.entityUrl = null;
|
||||||
|
|
||||||
const { entity, totalCount } = await this.$store.dispatch('fetchEntityBySlugAndType', {
|
const { entity, totalCount } = await this.$store.dispatch('fetchEntityBySlugAndType', {
|
||||||
|
@ -158,6 +162,7 @@ async function fetchEntity(scroll = true) {
|
||||||
}).toString();
|
}).toString();
|
||||||
|
|
||||||
this.entityUrl = campaign?.url || campaign?.affiliate?.url || `${entity.url}${campaign?.affiliate?.parameters ? `?${affiliateParams}` : ''}`;
|
this.entityUrl = campaign?.url || campaign?.affiliate?.url || `${entity.url}${campaign?.affiliate?.parameters ? `?${affiliateParams}` : ''}`;
|
||||||
|
this.done = true;
|
||||||
|
|
||||||
if (scroll && this.$refs.filter?.$el) {
|
if (scroll && this.$refs.filter?.$el) {
|
||||||
this.$refs.filter.$el.scrollIntoView();
|
this.$refs.filter.$el.scrollIntoView();
|
||||||
|
@ -189,6 +194,7 @@ export default {
|
||||||
entity: null,
|
entity: null,
|
||||||
pageTitle: null,
|
pageTitle: null,
|
||||||
totalCount: null,
|
totalCount: null,
|
||||||
|
done: false,
|
||||||
limit: Number(this.$route.query.limit) || 20,
|
limit: Number(this.$route.query.limit) || 20,
|
||||||
expanded: false,
|
expanded: false,
|
||||||
entityUrl: null,
|
entityUrl: null,
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
<template>
|
||||||
|
<div class="load-container">
|
||||||
|
<div class="load-ellipsis">
|
||||||
|
<div />
|
||||||
|
<div />
|
||||||
|
<div />
|
||||||
|
<div />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.load-container {
|
||||||
|
display: inline-flex;
|
||||||
|
position: relative;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-ellipsis {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: 5rem;
|
||||||
|
height: .75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-ellipsis div {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: .75rem;
|
||||||
|
height: .75rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-ellipsis div:nth-child(1) {
|
||||||
|
left: .5rem;
|
||||||
|
animation: load-ellipsis1 0.5s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-ellipsis div:nth-child(2) {
|
||||||
|
left: .5rem;
|
||||||
|
animation: load-ellipsis2 0.5s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-ellipsis div:nth-child(3) {
|
||||||
|
left: 2rem;
|
||||||
|
animation: load-ellipsis3 0.5s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-ellipsis div:nth-child(4) {
|
||||||
|
left: 3.5rem;
|
||||||
|
animation: load-ellipsis4 0.5s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load-ellipsis1 {
|
||||||
|
0% {
|
||||||
|
transform: scale(0);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load-ellipsis2 {
|
||||||
|
0% {
|
||||||
|
transform: translate(0, 0) scale(0.5);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translate(1.5rem, 0) scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load-ellipsis3 {
|
||||||
|
0% {
|
||||||
|
transform: translate(0, 0) scale(1);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translate(1.5rem, 0) scale(0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes load-ellipsis4 {
|
||||||
|
0% {
|
||||||
|
transform: scale(0.5);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -5,8 +5,10 @@
|
||||||
class="heading"
|
class="heading"
|
||||||
><span class="range">{{ range }}</span> releases for '{{ context }}'</h3>
|
><span class="range">{{ range }}</span> releases for '{{ context }}'</h3>
|
||||||
|
|
||||||
|
<Ellipsis v-if="!done" />
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
v-if="releases.length > 0"
|
v-else-if="releases.length > 0"
|
||||||
:key="sfw"
|
:key="sfw"
|
||||||
class="nolist tiles"
|
class="nolist tiles"
|
||||||
>
|
>
|
||||||
|
@ -25,7 +27,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
v-if="releases.length === 0 && range !== 'all'"
|
v-else-if="releases.length === 0 && range !== 'all'"
|
||||||
class="empty"
|
class="empty"
|
||||||
>No {{ range }} releases</span>
|
>No {{ range }} releases</span>
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Ellipsis from '../loading/ellipsis.vue';
|
||||||
import SceneTile from './scene-tile.vue';
|
import SceneTile from './scene-tile.vue';
|
||||||
|
|
||||||
function range() {
|
function range() {
|
||||||
|
@ -49,6 +52,7 @@ function sfw() {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
Ellipsis,
|
||||||
SceneTile,
|
SceneTile,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -60,6 +64,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
done: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
referer: {
|
referer: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
|
|
|
@ -64,7 +64,10 @@
|
||||||
:fetch-releases="fetchReleases"
|
:fetch-releases="fetchReleases"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Releases :releases="releases" />
|
<Releases
|
||||||
|
:releases="releases"
|
||||||
|
:done="done"
|
||||||
|
/>
|
||||||
|
|
||||||
<Pagination
|
<Pagination
|
||||||
:items-total="totalCount"
|
:items-total="totalCount"
|
||||||
|
@ -93,6 +96,8 @@ import Campaign from '../campaigns/campaign.vue';
|
||||||
const converter = new Converter();
|
const converter = new Converter();
|
||||||
|
|
||||||
async function fetchReleases(scroll = true) {
|
async function fetchReleases(scroll = true) {
|
||||||
|
this.done = false;
|
||||||
|
|
||||||
const { tag, releases, totalCount } = await this.$store.dispatch('fetchTagBySlug', {
|
const { tag, releases, totalCount } = await this.$store.dispatch('fetchTagBySlug', {
|
||||||
tagSlug: this.$route.params.tagSlug,
|
tagSlug: this.$route.params.tagSlug,
|
||||||
pageNumber: Number(this.$route.params.pageNumber),
|
pageNumber: Number(this.$route.params.pageNumber),
|
||||||
|
@ -107,6 +112,8 @@ async function fetchReleases(scroll = true) {
|
||||||
this.hasMedia = this.tag.poster || this.tag.photos.length > 0;
|
this.hasMedia = this.tag.poster || this.tag.photos.length > 0;
|
||||||
this.description = this.tag.description && converter.makeHtml(escapeHtml(this.tag.description));
|
this.description = this.tag.description && converter.makeHtml(escapeHtml(this.tag.description));
|
||||||
|
|
||||||
|
this.done = true;
|
||||||
|
|
||||||
if (this.hasMedia) {
|
if (this.hasMedia) {
|
||||||
this.showBannerCampaign = true;
|
this.showBannerCampaign = true;
|
||||||
}
|
}
|
||||||
|
@ -146,6 +153,7 @@ export default {
|
||||||
tag: null,
|
tag: null,
|
||||||
description: null,
|
description: null,
|
||||||
releases: null,
|
releases: null,
|
||||||
|
done: false,
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
pageTitle: null,
|
pageTitle: null,
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
|
@ -665,12 +665,13 @@ const tagMedia = [
|
||||||
['blonde', 'shawna_lenee_sunrisekings', 'Shawna Lenee', 'sunrisekings'],
|
['blonde', 'shawna_lenee_sunrisekings', 'Shawna Lenee', 'sunrisekings'],
|
||||||
['blonde', 2, 'Isabelle Deltore', 'herlimit'],
|
['blonde', 2, 'Isabelle Deltore', 'herlimit'],
|
||||||
['blowbang', 'ana_foxxx_hardx', 'Ana Foxxx in "Facialized Vol. 4"', 'hardx'],
|
['blowbang', 'ana_foxxx_hardx', 'Ana Foxxx in "Facialized Vol. 4"', 'hardx'],
|
||||||
|
['blowbang', 'lisey_sweet_legalporno', 'Lisey Sweet in GIO816', 'legalporno'],
|
||||||
['blowbang', 'angela_white_julesjordan', 'Angela White in "Her Biggest Gangbang Ever"', 'julesjordan'],
|
['blowbang', 'angela_white_julesjordan', 'Angela White in "Her Biggest Gangbang Ever"', 'julesjordan'],
|
||||||
['blowbang', 'monika_fox_legalporno', 'Monika Fox in GL479', 'legalporno'],
|
['blowbang', 'monika_fox_legalporno', 'Monika Fox in GL479', 'legalporno'],
|
||||||
['blowbang', 0, 'Lacy Lennon in "Lacy Lennon\'s First Blowbang"', 'hardx'],
|
['blowbang', 0, 'Lacy Lennon in "Lacy Lennon\'s First Blowbang"', 'hardx'],
|
||||||
['blowbang', 'zaawaadi_roccosiffredi_1', 'Zaawaadi in "My Name Is Zaawaadi"', 'roccosiffredi'],
|
['blowbang', 'zaawaadi_roccosiffredi_1', 'Zaawaadi in "My Name Is Zaawaadi"', 'roccosiffredi'],
|
||||||
['blowbang', 'gina_gerson_assholefever', 'Gina Gerson in "Oppa Gangbang Style"', 'assholefever'],
|
|
||||||
['blowbang', 1, 'Nicole Black in GIO1680', 'legalporno'],
|
['blowbang', 1, 'Nicole Black in GIO1680', 'legalporno'],
|
||||||
|
['blowbang', 'gina_gerson_assholefever', 'Gina Gerson in "Oppa Gangbang Style"', 'assholefever'],
|
||||||
['blowjob', 'clanddi_jinkcego_ddfbusty_1', 'Clanddi Jinkcego', 'ddfbusty'],
|
['blowjob', 'clanddi_jinkcego_ddfbusty_1', 'Clanddi Jinkcego', 'ddfbusty'],
|
||||||
['blowjob', 'juelz_ventura_babygotboobs', 'Juelz Ventura in "A Deep DP For Dessert"', 'babygotboobs'],
|
['blowjob', 'juelz_ventura_babygotboobs', 'Juelz Ventura in "A Deep DP For Dessert"', 'babygotboobs'],
|
||||||
['blowjob', 4, 'Chloe Cherry in "Chloe\'s Big Anal"', 'darkx'],
|
['blowjob', 4, 'Chloe Cherry in "Chloe\'s Big Anal"', 'darkx'],
|
||||||
|
@ -1020,6 +1021,7 @@ const tagMedia = [
|
||||||
['trainbang', 1, 'Ria Sunn', 'private'],
|
['trainbang', 1, 'Ria Sunn', 'private'],
|
||||||
['trainbang', 0, 'Nicole Black in GIO971', 'legalporno'],
|
['trainbang', 0, 'Nicole Black in GIO971', 'legalporno'],
|
||||||
['tap', 4, 'Francys Belle in GIO1103', 'legalporno'],
|
['tap', 4, 'Francys Belle in GIO1103', 'legalporno'],
|
||||||
|
['tap', 'lisey_sweet_legalporno', 'Lisey Sweet in GIO816', 'legalporno'],
|
||||||
['tap', 3, 'Julia Red in GIO1007', 'legalporno'],
|
['tap', 3, 'Julia Red in GIO1007', 'legalporno'],
|
||||||
['tap', 1, 'Natasha Teen in SZ2098', 'legalporno'],
|
['tap', 1, 'Natasha Teen in SZ2098', 'legalporno'],
|
||||||
['tap', 2, 'Kira Thorn in GIO1018', 'legalporno'],
|
['tap', 2, 'Kira Thorn in GIO1018', 'legalporno'],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
const log = require('why-is-node-running');
|
// const log = require('why-is-node-running');
|
||||||
const Inspector = require('inspector-api');
|
const Inspector = require('inspector-api');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const dayjs = require('dayjs');
|
const dayjs = require('dayjs');
|
||||||
|
@ -24,8 +24,10 @@ const getFileEntries = require('./utils/file-entries');
|
||||||
const inspector = new Inspector();
|
const inspector = new Inspector();
|
||||||
|
|
||||||
function logActive() {
|
function logActive() {
|
||||||
|
console.log('log active!');
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
log();
|
// log();
|
||||||
logActive();
|
logActive();
|
||||||
}, typeof argv.logActive === 'number' ? argv.logActive : 60000);
|
}, typeof argv.logActive === 'number' ? argv.logActive : 60000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,6 +171,7 @@ async function getSession(site, parameters) {
|
||||||
session,
|
session,
|
||||||
interval: parameters?.interval,
|
interval: parameters?.interval,
|
||||||
concurrency: parameters?.concurrency,
|
concurrency: parameters?.concurrency,
|
||||||
|
parse: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
|
|
|
@ -23,6 +23,7 @@ Promise.config({
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
timeout: argv.requestTimeout,
|
timeout: argv.requestTimeout,
|
||||||
encodeJSON: true,
|
encodeJSON: true,
|
||||||
|
parse: false,
|
||||||
headers: {
|
headers: {
|
||||||
'user-agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1',
|
'user-agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1',
|
||||||
},
|
},
|
||||||
|
@ -114,14 +115,14 @@ async function finalizeResult(res, options) {
|
||||||
|
|
||||||
if (Buffer.isBuffer(res.body)) {
|
if (Buffer.isBuffer(res.body)) {
|
||||||
const html = res.body.toString();
|
const html = res.body.toString();
|
||||||
const window = new JSDOM(html, { virtualConsole, ...options.extract }).window;
|
const window = options?.parse ? new JSDOM(html, { virtualConsole, ...options.extract }).window : null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...res,
|
...res,
|
||||||
body: html,
|
body: html,
|
||||||
html,
|
html,
|
||||||
status: res.statusCode,
|
status: res.statusCode,
|
||||||
document: window.document,
|
document: window?.document || null,
|
||||||
window,
|
window,
|
||||||
ok: res.statusCode >= 200 && res.statusCode <= 299,
|
ok: res.statusCode >= 200 && res.statusCode <= 299,
|
||||||
};
|
};
|
||||||
|
|
|
@ -521,7 +521,11 @@ function extractAll(htmlValue, selector, options) {
|
||||||
async function request(method = 'get', urlValue, body, selector, headers, options, queryAll = false) {
|
async function request(method = 'get', urlValue, body, selector, headers, options, queryAll = false) {
|
||||||
const res = await (method === 'post'
|
const res = await (method === 'post'
|
||||||
? http.post(urlValue, body, { ...options, headers })
|
? http.post(urlValue, body, { ...options, headers })
|
||||||
: http[method](urlValue, { ...options, headers }));
|
: http[method](urlValue, {
|
||||||
|
...options,
|
||||||
|
headers,
|
||||||
|
parse: true,
|
||||||
|
}));
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
const item = queryAll
|
const item = queryAll
|
||||||
|
|
Loading…
Reference in New Issue