Added generic photo page extract method to media module, to allow pre-filtering sources and relief Dogfart scraper. Added 'transsexual' site tag to Trans Angels.

This commit is contained in:
2020-02-02 22:36:33 +01:00
parent 204a4d4bdd
commit 0ed1b2eff9
4 changed files with 51 additions and 26 deletions

View File

@@ -9,7 +9,11 @@ async function fetchScene(url, site) {
const res = await bhttp.get(`https://www.blowpass.com/en/video/${site.id}/${new URL(url).pathname.split('/').slice(-2).join('/')}`);
const release = await scrapeScene(res.body.toString(), url, site);
release.channel = release.$('.siteNameSpan').text().trim().toLowerCase();
release.channel = release.$('.siteNameSpan')
.text()
.trim()
.toLowerCase()
.replace('.com', '');
if (['onlyteenblowjobs.com', 'mommyblowsbest.com'].includes(release.channel)) release.url = url.replace(/video\/\w+\//, 'scene/');
else release.url = url.replace(/video\/\w+\//, 'video/');