Improved actor profile flow. Added images.
This commit is contained in:
@@ -119,17 +119,12 @@ async function scrapeProfile(html, _url, actorName) {
|
||||
const descriptionEl = document.querySelector('.description-box');
|
||||
const avatarEl = document.querySelector('.pornstar-details .card-img-top');
|
||||
|
||||
const country = await knex('countries')
|
||||
.where('nationality', 'ilike', `%${bio.Nationality}%`)
|
||||
.orderBy('priority', 'desc')
|
||||
.first();
|
||||
|
||||
const profile = {
|
||||
name: actorName,
|
||||
};
|
||||
|
||||
profile.birthdate = moment.utc(bio.Birthday, 'MMMM DD, YYYY').toDate();
|
||||
if (country) profile.birthPlace = country.name;
|
||||
if (bio.Nationality) profile.nationality = bio.Nationality;
|
||||
|
||||
if (bio['Bra size']) [profile.bust] = bio['Bra size'].match(/\d+\w+/);
|
||||
if (bio.Waist) profile.waist = Number(bio.Waist.match(/\d+/)[0]);
|
||||
|
||||
Reference in New Issue
Block a user