-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add darioamodei route #18187
base: master
Are you sure you want to change the base?
feat: add darioamodei route #18187
Conversation
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
|
||
export default async function darioamodeiHandler(ctx) { | ||
const rootUrl = 'https://darioamodei.com'; | ||
|
Check failure
Code scanning / ESLint
Disallow trailing whitespace at the end of lines Error
const items = $('.essay') | ||
.map((_, essay) => { | ||
const $essay = $(essay); | ||
const $title = $essay.find('h3'); | ||
const $link = $essay.find('a').first(); | ||
const dateStr = $essay.find('span').first().text().trim(); | ||
// 获取文章详情页 | ||
const articleUrl = new URL($link.attr('href'), rootUrl).href; | ||
return { | ||
title: $title.text().trim(), | ||
link: articleUrl, | ||
// 暂时使用文章预览作为描述,后续可以抓取详情页获取完整内容 | ||
description: $essay.find('p').text().trim(), | ||
// 解析日期,格式如 "March 2024" | ||
pubDate: parseDate(dateStr, 'MMMM YYYY'), | ||
}; | ||
}) | ||
.toArray(); |
Check warning
Code scanning / ESLint
Disallow specified syntax Warning
Successfully generated as following: http://localhost:1200/darioamodei - Failed ❌
|
This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days. |
Involved Issue / 该 PR 相关 Issue
Close #
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
Puppeteer
Note / 说明