return matches[1]
end
+ # I've seen some free software videos encoded as OGG/Vorbis, too.
+ video_url_regex = /"Ogg Theora\/Vorbis \(\.og[gv]\)", "attribute" : "(.*?\.og[gv])/i
+ matches = video_url_regex.match(page_data)
+
+ if not matches.nil?
+ return matches[1]
+ end
+
# If that didn't work, try the WMV format, which is occasionally
# used for the source as well.
video_url_regex = /"Windows Media \(\.wmv\)", "attribute" : "(.*?\.wmv)/i
# If neither of the source formats are present, just grab the
# video URL from the Flash variable and be done with it.
- video_url_regex = /setPrimaryMediaUrl\("(.*?\.(flv|mov|wmv|mp4))/i
+ video_url_regex = /setPrimaryMediaUrl\("(.*?\.(flv|mov|wmv|mp4|og[gv]))/i
matches = video_url_regex.match(page_data)
if matches.nil?