mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 18:29:14 +02:00
Fix
This commit is contained in:
@@ -63,10 +63,11 @@ module.exports = class MayoClinicCommand extends Command {
|
|||||||
const $ = cheerio.load(text);
|
const $ = cheerio.load(text);
|
||||||
const header = $('h2').first();
|
const header = $('h2').first();
|
||||||
if (header.text() === 'Overview') {
|
if (header.text() === 'Overview') {
|
||||||
|
const caption = $('p[class="caption"]').first().next().text().trim();
|
||||||
return {
|
return {
|
||||||
name: $('h1').first().text().trim(),
|
name: $('h1').first().text().trim(),
|
||||||
url: location,
|
url: location,
|
||||||
description: header.next().text().trim()
|
description: caption || header.next().text().trim()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return location;
|
return location;
|
||||||
|
|||||||
Reference in New Issue
Block a user