This commit is contained in:
Dragon Fire
2021-01-13 17:25:27 -05:00
parent 67b2aa5c67
commit 29eb54673b
+2 -1
View File
@@ -63,10 +63,11 @@ module.exports = class MayoClinicCommand extends Command {
const $ = cheerio.load(text);
const header = $('h2').first();
if (header.text() === 'Overview') {
const caption = $('p[class="caption"]').first().next().text().trim();
return {
name: $('h1').first().text().trim(),
url: location,
description: header.next().text().trim()
description: caption || header.next().text().trim()
};
}
return location;