Added URL helper to q. Getting social links from Boobpedia.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user