Added URL helper to q. Getting social links from Boobpedia.

This commit is contained in:
2020-01-23 23:32:51 +01:00
parent b30775faba
commit 6ef5c82c6a
3 changed files with 14 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ const bhttp = require('bhttp');
const { ex } = require('../utils/q');
function scrapeProfile(html) {
const { q, qa, qd, qi } = ex(html); /* eslint-disable-line object-curly-newline */
const { q, qa, qd, qi, qu } = ex(html); /* eslint-disable-line object-curly-newline */
const profile = {};
const bio = qa('.infobox tr[valign="top"]')
@@ -61,11 +61,9 @@ function scrapeProfile(html) {
profile.avatar = `http://www.boobpedia.com${avatarPath}`;
}
const socials = qa('.infobox a.external');
profile.social = qu('.infobox a.external');
console.log(socials);
// return profile;
return profile;
}
async function fetchProfile(actorName) {