Added profile scraper tests (WIP), fixed some profile scrapers. Fixed slugify not breaking existing slugs.
This commit is contained in:
@@ -216,7 +216,8 @@ function getUrl(site) {
|
||||
}
|
||||
|
||||
async function getSession(site, parameters, url) {
|
||||
if (site.slug === 'mindgeek' || site.parameters?.parentSession === false) {
|
||||
// if (site.slug === 'aylo' || site.parameters?.parentSession === false) {
|
||||
if (site.slug === 'aylo') {
|
||||
// most MG sites have a parent network to acquire a session from, don't try to acquire session from mindgeek.com for independent channels
|
||||
return null;
|
||||
}
|
||||
@@ -224,7 +225,7 @@ async function getSession(site, parameters, url) {
|
||||
const cookieJar = new CookieJar();
|
||||
const session = http.session({ cookieJar });
|
||||
|
||||
const sessionUrl = site.parameters?.siteId && !(site.parameters?.native || site.parameters?.childSession || site.parent?.parameters?.childSession)
|
||||
const sessionUrl = site.parameters?.siteId && !(site.parameters?.native || site.parameters?.childSession || site.parent?.parameters?.childSession || site.parameters?.parentSession === false)
|
||||
? site.parent.url
|
||||
: (url || site.url);
|
||||
|
||||
@@ -360,7 +361,12 @@ function scrapeProfile(data, networkName, _releases = []) {
|
||||
};
|
||||
|
||||
profile.gender = data.gender === 'other' ? 'transsexual' : data.gender;
|
||||
profile.measurements = data.measurements;
|
||||
|
||||
if (profile.gender === 'male') {
|
||||
profile.penisLength = Number(data.measurements);
|
||||
} else {
|
||||
profile.measurements = data.measurements;
|
||||
}
|
||||
|
||||
profile.dateOfBirth = qu.parseDate(data.birthday);
|
||||
profile.birthPlace = data.birthPlace;
|
||||
|
||||
Reference in New Issue
Block a user