FEATURE: Youtube Short onebox support (#19335)

* FEATURE: Youtube Shorts onebox support

Co-authored-by: Canapin <canapin@gmail.com>
This commit is contained in:
Rafael dos Santos Silva
2022-12-06 11:56:48 -03:00
committed by GitHub
parent 57fe57e7ce
commit d247e5d37c
3 changed files with 20 additions and 0 deletions

View File

@ -103,6 +103,11 @@ module Onebox
id ||= uri.path[/\/embed\/([\w\-]+)/, 1]
end
# https://www.youtube.com/shorts/wi2jAtpBl0Y
if uri.path["/shorts/"]
id ||= uri.path[/\/shorts\/([\w\-]+)/, 1]
end
# https://www.youtube.com/watch?v=Z0UISCEe52Y
id ||= params['v']