martin
(Martin Brennan)
13
好的,我认为我这里有一个修复方法,我们应该改用 YouTube 的 oEmbed 来处理这些内容:
我不这么认为,这似乎是两件事:
- 某种奇怪的 IP 速率限制/重定向,因为有时对于我们托管上的不同站点,OP 链接会起作用
- 这段代码不再有效,因为我们期望的 JSON 不再存在 discourse/lib/onebox/engine/youtube_onebox.rb at e144ec07c8c17ad0f73427524bccc10c074d5a19 · discourse/discourse · GitHub
总的来说,oEmbed URL 似乎更安全,对于 OP 视频,它是 https://www.youtube.com/oembed?url=https://youtube.com/shorts/Cs3sTnLO6EE&format=json,你会得到类似这样的响应:
2 个赞