Fixed avatars without entropy being discarded.

This commit is contained in:
DebaucheryLibrarian
2021-01-22 15:40:49 +01:00
parent 130368ca70
commit bd9b795516
2 changed files with 6 additions and 4 deletions

View File

@@ -19,8 +19,8 @@ function scrape(html, site) {
const sceneLinkElement = $(element).find('.thmb_lnk');
release.title = sceneLinkElement.attr('title');
release.url = site.parameters?.legacy
? `${site.url}{sceneLinkElement.attr('href')}`
release.url = site.parameters?.legacy || !site.parent
? `${site.url}${sceneLinkElement.attr('href')}`
: `${site.parent.url}${sceneLinkElement.attr('href')}`;
release.shootId = sceneLinkElement.attr('id') && sceneLinkElement.attr('id').split('-')[1];
@@ -154,7 +154,7 @@ function scrapeProfile(html, scope) {
const avatar = query.q('.profilePic img', 'src');
if (avatar) profile.avatar = `https:${avatar}`;
profile.releases = scrape(html, scope.network);
profile.releases = scrape(html, scope.entity);
return profile;
}