# 如果 Onebox 对精选链接不起作用，Discourse 是否应该抓取标题？

**URL:** https://meta.discourse.org/t/should-discourse-fetch-the-title-if-onebox-doesnt-work-for-featured-links/144653
**Category:** Feature
**Tags:** featured-link
**Created:** [2020年三月17日 22:49 UTC](https://meta.discourse.org/t/should-discourse-fetch-the-title-if-onebox-doesnt-work-for-featured-links/144653 "2020-03-17T22:49:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [2020年三月17日 22:49 UTC](https://meta.discourse.org/t/should-discourse-fetch-the-title-if-onebox-doesnt-work-for-featured-links/144653/1 "2020-03-17T22:49:21Z")

</div>

我刚刚尝试在主题中添加一个精选链接，但它使用了 URL 作为标题。我认为如果系统能先尝试通过 Onebox 获取信息，若失败则使用页面标题作为主题标题，这样会更好。如果这也失败，再像现在这样直接使用 URL。

我打算在一个专门的分类中开始使用精选链接，但我们并不希望标题显示为 URL，因此增加此功能将非常有帮助。既然系统已经在检查该网站，那么顺便获取标题应该不难吧？

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [2020年四月12日 01:34 UTC](https://meta.discourse.org/t/should-discourse-fetch-the-title-if-onebox-doesnt-work-for-featured-links/144653/2 "2020-04-12T01:34:19Z")

</div>

团队之后对此有什么看法吗？我觉得这可能是一个很棒的功能，我在想以下改进是否能让它更实用？

1. 用户在标题字段中粘贴链接
2. 预览窗格会显示已添加（“精选链接：URL ✅”）
3. Discourse 获取一框信息以填充标题和正文（与当前方式相同）
4. 如果一框功能失效，Discourse 则抓取页面标题作为标题
5. 如果步骤 3 和 4 均失败，且标题字段仅剩下 URL，Discourse 将从标题字段中移除该 URL，从而提示用户手动添加标题——但用户仍会在预览窗格中看到链接已被添加

😃
