# Youtube "短"视频类型嵌入/oneboxing不起作用

**URL:** <https://meta.discourse.org/t/youtube-short-videos-type-embedding-oneboxing-not-working/225350>\
**Category:** Feature\
**Tags:** completed\
**Created:** [2022 年4 月 26 日 17:35 UTC](https://meta.discourse.org/t/youtube-short-videos-type-embedding-oneboxing-not-working/225350 "2022-04-26T17:35:39Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

作者： ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
发布日期： [2022 年11 月 27 日 20:47 UTC](https://meta.discourse.org/t/youtube-short-videos-type-embedding-oneboxing-not-working/225350/11 "2022-11-27T20:47:57Z")

</div>

我虽然做完了，但我可能在我的拉取请求（pull request）中搞砸了一些东西，因为不知何故，我还不习惯 GitHub……我真的需要阅读手册（而且，一位朋友告诉我，需要从我的 Discourse 分叉（fork）创建分支……）：🙃

仅供参考，我刚刚编辑了文件 `lib\\onebox\\engine\\youtube_onebox.rb` 来添加

```ruby
# https://www.youtube.com/shorts/wi2jAtpBl0Y
if uri.path["/shorts/"]
  id ||= uri.path[/\\/shorts\\/([\\w\\-]+)/, 1]
end

```

---

_[View the full topic](https://meta.discourse.org/t/youtube-short-videos-type-embedding-oneboxing-not-working/225350)._
