Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 4a2d2ad996 1.192.1 2021-03-29 22:47:48 +02:00
DebaucheryLibrarian 010da8954b Fixed MYLF scraper failing when channel is missing, fixed profile measurement matching. Added MYLF Selects channel. 2021-03-29 22:47:43 +02:00
4 changed files with 17 additions and 9 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx",
"version": "1.192.0",
"version": "1.192.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.192.0",
"version": "1.192.1",
"license": "ISC",
"dependencies": {
"@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.192.0",
"version": "1.192.1",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -5263,6 +5263,15 @@ const sites = [
id: 'mylfwood',
},
},
{
slug: 'mylfselects',
name: 'MYLF Selects',
url: 'https://www.mylf.com/series/selects',
parent: 'mylf',
parameters: {
id: 'selects',
},
},
{
slug: 'stayhomemilf',
name: 'StayHomeMilf',

View File

@ -15,7 +15,7 @@ function getChannelSlug(channelName, entity) {
const channelSlug = slugify(channelName, '', { removePunctuation: true });
const channel = entity.children.find(child => new RegExp(channelSlug).test(child.slug));
return channel.slug;
return channel?.slug || null;
}
function scrapeScene(scene, channel) {
@ -70,10 +70,9 @@ function scrapeProfile(actor, entity) {
}, {});
// birthdate seems never/rarely correct
const measurements = bio.measurements?.match(/Measurements: (\d+)(\w+)-(\d+)-(\d+)/i);
if (measurements) {
[profile.bust, profile.cup, profile.waist, profile.hip] = measurements.slice(1);
if (bio.measurements) {
profile.measurements = bio.measurements;
} else {
const breastSize = actor.bio.breastSize?.match(/(\d+)(\w+)/)?.slice(1) || actor.bio.about.match(/Measurements: (\d+)(\w+)/)?.slice(1);
@ -144,8 +143,8 @@ async function fetchProfile(baseActor, { entity, parameters }) {
const url = format(parameters.profiles, { slug: baseActor.slug });
const res = await qu.get(url);
if (res.ok) {
return scrapeProfile(res.body, entity);
if (res.ok && res.body) {
return scrapeProfile(res.body._source, entity);
}
return res.status;