Added Jules Jordan scraper. Added render argument to stop going into ncurses mode during dev.

This commit is contained in:
2019-03-18 04:46:53 +01:00
parent d84466445c
commit 1a170bfbd5
12 changed files with 394 additions and 59 deletions

View File

@@ -14,7 +14,10 @@ function scrape(html, site) {
const actors = $('.home_model_name a').toArray().map(element => $(element).text().replace(/,[\u0020\u00A0\u202F]/, '')); // replace weird commas
const date = moment.utc($('.add_date').text(), 'DD-MM-YYYY').toDate();
const stars = $('img[src*="/star.png"]').toArray().map(element => $(element).attr('src')).length || null;
const stars = $('img[src*="/star.png"]')
.toArray()
.map(element => $(element).attr('src'))
.length || null;
return {
url,
@@ -31,8 +34,6 @@ function scrape(html, site) {
}
async function fetchReleases(site) {
// const session = bhttp.session();
const res = await bhttp.get(`${site.url}/final_latestupdateview.php?limitstart=0&limitend=9&websiteid=0&deviceview=browser&tourId=${site.parameters.tourId}`);
const elements = JSON.parse(res.body.toString());