mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): Dilbert Strip (#8737)
This commit is contained in:
@@ -9,12 +9,15 @@ async function load(link, id) {
|
||||
|
||||
const context = $('.comic-item-container > .meta-info-container');
|
||||
const img = context.find('img.img-comic');
|
||||
const transcript = context.find('.js-toggle-container > p');
|
||||
const transcript = context.find('.comic-transcript p').html();
|
||||
|
||||
const title = img.attr('alt').replace('Dilbert by Scott Adams', id);
|
||||
const src = 'https:' + img.attr('src');
|
||||
const src = img.attr('src');
|
||||
|
||||
const description = `<img src="${src}"></br><p>${transcript.html()}</p>`;
|
||||
let description = `<img src="${src}">`;
|
||||
if (transcript) {
|
||||
description += `<br/><p>${transcript}</p>`;
|
||||
}
|
||||
|
||||
return {
|
||||
title,
|
||||
@@ -29,7 +32,7 @@ module.exports = async (ctx) => {
|
||||
const feed = await parser.parseURL(feed_url);
|
||||
const items = await Promise.all(
|
||||
feed.items.slice(0, 7).map(async (item) => {
|
||||
const link = `https://dilbert.com/strip/${item.id}`;
|
||||
const link = item.link;
|
||||
|
||||
const single = {
|
||||
pubDate: item.pubDate,
|
||||
|
||||
Reference in New Issue
Block a user