Added Bang! actor scraper. Fixed date interpolation. Showing date and age of death on profile (only if actor has already died).
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
const { JSDOM } = require('jsdom');
|
||||
const cheerio = require('cheerio');
|
||||
const moment = require('moment');
|
||||
// const bhttp = require('bhttp');
|
||||
|
||||
const { get } = require('../utils/http');
|
||||
|
||||
@@ -233,7 +234,26 @@ async function fetchScene(url, site) {
|
||||
return res.code;
|
||||
}
|
||||
|
||||
/* API protected
|
||||
async function fetchProfile(actorName, scraperSlug, site) {
|
||||
const session = bhttp.session();
|
||||
|
||||
await session.get(`https://tour.${site.slug}.com`);
|
||||
|
||||
const url = `https://tour.${site.slug}.com/search-preview`;
|
||||
const res = await session.post(url, { q: actorName }, {
|
||||
headers: {
|
||||
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36',
|
||||
origin: `https://tour.${site.slug}.com`,
|
||||
},
|
||||
});
|
||||
|
||||
console.log(res.body.toString());
|
||||
}
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
fetchLatest,
|
||||
// fetchProfile,
|
||||
fetchScene,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user