Added 'clear all' button to tag filter. Tag name never removes tag. Added actor scene scraping to LegalPorno.
This commit is contained in:
@@ -42,7 +42,7 @@ function getPoster(posterElement, sceneId) {
|
||||
return `https://legalporno.com/casting/${sceneId}/${posterTime}`;
|
||||
}
|
||||
|
||||
function scrapeLatest(html, site) {
|
||||
function scrapeAll(html) {
|
||||
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
||||
const scenesElements = $('.thumbnails > div').toArray();
|
||||
|
||||
@@ -68,7 +68,6 @@ function scrapeLatest(html, site) {
|
||||
title,
|
||||
date,
|
||||
poster,
|
||||
site,
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -111,13 +110,6 @@ async function scrapeScene(html, url, site, useGallery) {
|
||||
const { origin, pathname } = new URL(source);
|
||||
|
||||
return `${origin}${pathname}`;
|
||||
|
||||
/* disable thumbnail as fallback, usually enough high res photos available
|
||||
return [
|
||||
`${origin}${pathname}`,
|
||||
source,
|
||||
];
|
||||
*/
|
||||
});
|
||||
|
||||
const posterStyle = $('#player').attr('style');
|
||||
@@ -165,13 +157,15 @@ async function scrapeProfile(html, _url, actorName) {
|
||||
if (bio.Age) profile.age = bio.Age;
|
||||
if (avatarEl) profile.avatar = avatarEl.src;
|
||||
|
||||
profile.releases = scrapeAll(html);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchLatest(site, page = 1) {
|
||||
const res = await bhttp.get(`${site.url}/new-videos/${page}`);
|
||||
|
||||
return scrapeLatest(res.body.toString(), site);
|
||||
return scrapeAll(res.body.toString(), site);
|
||||
}
|
||||
|
||||
async function fetchScene(url, site) {
|
||||
|
||||
Reference in New Issue
Block a user