Improved MindGeek avatar fix.
This commit is contained in:
parent
9c00216e62
commit
81ede3f511
|
@ -138,11 +138,13 @@ function scrapeProfile(data, html) {
|
|||
if (data.height) profile.height = inchesToCm(data.height);
|
||||
if (data.weight) profile.weight = lbsToKg(data.weight);
|
||||
|
||||
profile.avatar = data.images.card_main_rect?.[0].xl?.url
|
||||
|| data.images.card_main_rect?.[0].lg?.url
|
||||
|| data.images.card_main_rect?.[0].md?.url
|
||||
|| data.images.card_main_rect?.[0].sm?.url
|
||||
|| data.images.card_main_rect?.[0].xs?.url;
|
||||
if (data.images.card_main_rect && data.images.card_main_rect[0]) {
|
||||
profile.avatar = data.images.card_main_rect[0].xl?.url
|
||||
|| data.images.card_main_rect[0].lg?.url
|
||||
|| data.images.card_main_rect[0].md?.url
|
||||
|| data.images.card_main_rect[0].sm?.url
|
||||
|| data.images.card_main_rect[0].xs?.url;
|
||||
}
|
||||
|
||||
const birthdate = qa('li').find(el => /Date of Birth/.test(el.textContent));
|
||||
if (birthdate) profile.birthdate = qd(birthdate, 'span', 'MMMM Do, YYYY');
|
||||
|
|
Loading…
Reference in New Issue