Compare commits
2 Commits
786ef491ac
...
392d1daa2a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
392d1daa2a | ||
|
|
d360854a6d |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.248.39",
|
"version": "1.248.40",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.248.39",
|
"version": "1.248.40",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.458.0",
|
"@aws-sdk/client-s3": "^3.458.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.248.39",
|
"version": "1.248.40",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const unprint = require('unprint');
|
|||||||
|
|
||||||
const slugify = require('../utils/slugify');
|
const slugify = require('../utils/slugify');
|
||||||
|
|
||||||
function scrapeProfile(model, channel) {
|
function scrapeProfile(model, channel, isProfile = false) {
|
||||||
const profile = {};
|
const profile = {};
|
||||||
|
|
||||||
profile.name = model.name; // used by shallow scrape
|
profile.name = model.name; // used by shallow scrape
|
||||||
@@ -12,22 +12,6 @@ function scrapeProfile(model, channel) {
|
|||||||
|
|
||||||
profile.dateOfBirth = unprint.extractDate(model.birthdate, 'YYYY-MM-DD');
|
profile.dateOfBirth = unprint.extractDate(model.birthdate, 'YYYY-MM-DD');
|
||||||
|
|
||||||
profile.birthPlace = model.countries?.map((country) => {
|
|
||||||
if (country.name) {
|
|
||||||
return country.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (country.isO2 || country.iso2) { // sic
|
|
||||||
return country.isO2 || country.iso2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof country === 'string') {
|
|
||||||
return country;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}).filter(Boolean)[0];
|
|
||||||
|
|
||||||
profile.height = model.height;
|
profile.height = model.height;
|
||||||
profile.weight = model.weight;
|
profile.weight = model.weight;
|
||||||
|
|
||||||
@@ -41,6 +25,25 @@ function scrapeProfile(model, channel) {
|
|||||||
profile.url = `${channel.origin}/modelcollections/${model.id}`;
|
profile.url = `${channel.origin}/modelcollections/${model.id}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isProfile) {
|
||||||
|
// exclude from scene actor data, as this will trigger a metric ton of untimely location lookups
|
||||||
|
profile.birthPlace = model.countries?.map((country) => {
|
||||||
|
if (country.name) {
|
||||||
|
return country.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (country.isO2 || country.iso2) { // sic
|
||||||
|
return country.isO2 || country.iso2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof country === 'string') {
|
||||||
|
return country;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}).filter(Boolean)[0];
|
||||||
|
}
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +238,7 @@ async function fetchProfile(actor, channel) {
|
|||||||
const res = await unprint.get(`https://api.inthecrack.com/Model/${modelId}`);
|
const res = await unprint.get(`https://api.inthecrack.com/Model/${modelId}`);
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
return scrapeProfile(res.data, channel);
|
return scrapeProfile(res.data, channel, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user