From 357c5b28d4b484f9d4734d09fed305e17faf38ac Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 6 Oct 2016 05:21:07 +0200 Subject: [PATCH] Fix VLC (nightly) URL. (#2713) --- Casks/vlc-nightly.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Casks/vlc-nightly.rb b/Casks/vlc-nightly.rb index 2e5044943..f7e1af337 100644 --- a/Casks/vlc-nightly.rb +++ b/Casks/vlc-nightly.rb @@ -2,7 +2,12 @@ cask 'vlc-nightly' do version :latest sha256 :no_check - url 'http://nightlies.videolan.org/build/macosx-intel/last' + url do + require 'open-uri' + base_url = 'http://nightlies.videolan.org/build/macosx-intel/last' + file = open(base_url).read.scan(%r{href="([^"]+.dmg)"}).flatten.first + "#{base_url}/#{file}" + end name 'VLC media player' homepage 'https://www.videolan.org/vlc/' license :oss