FIX: Vimeo private video oneboxes were broken (#14510)

FIX: Vimeo private video oneboxes were broken (#14510)

diff --git a/lib/onebox/engine/vimeo_onebox.rb b/lib/onebox/engine/vimeo_onebox.rb
index d35dc54..9c35fb9 100644
--- a/lib/onebox/engine/vimeo_onebox.rb
+++ b/lib/onebox/engine/vimeo_onebox.rb
@@ -18,12 +18,8 @@ module Onebox
       end
 
       def to_html
-        video_id = oembed_data[:video_id]
-        if video_id.nil?
-          # for private videos
-          video_id = uri.path[/\/(\d+)/, 1]
-        end
-        video_src = "https://player.vimeo.com/video/#{video_id}"
+        video_src = Nokogiri::HTML5::fragment(oembed_data[:html]).at_css('iframe')&.[]("src")
+        video_src = "https://player.vimeo.com/video/#{oembed_data[:video_id]}" if video_src.blank?
         video_src = video_src.gsub('autoplay=1', '').chomp("?")
 
         <<-HTML

GitHub sha: fbe9cd49b6702332fccd085f6b0170de28bda87f

This commit appears in #14510 which was approved by CvX. It was merged by techAPJ.

This commit has been mentioned on Discourse Meta. There might be relevant details there: