Skip to content

Commit

Permalink
fix(route): fix author field for ft.com (#13400)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzx-dzx authored Sep 26, 2023
1 parent 143a42f commit adf40af
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/v2/ft/myft.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);

item.description = ProcessFeed($('article.js-article__content-body'));
item.category = JSON.parse($('script[type="application/ld+json"]').eq(1).text()).itemListElement.map((e) => e.name);
item.author = $('a.n-content-tag--author').text();
item.category = [$('.n-content-tag--with-follow').text()].concat(
$('.article__right-bottom a.concept-list__concept')
.map((i, e) => $(e).text().trim())
.get()
);
item.author = $('a.n-content-tag--author')
.map((i, e) => $(e).text())
.get();

return item;
})
Expand Down

0 comments on commit adf40af

Please sign in to comment.