mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user