From: Michael Orlitzky Date: Mon, 18 Oct 2010 03:28:20 +0000 (-0400) Subject: Add a missing character to VALID_BLIPTV_REDIR_URL_REGEX. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=b45a395047ef46761b58b12df1afd9e948a3f786;p=dead%2Fwhatever-dl.git Add a missing character to VALID_BLIPTV_REDIR_URL_REGEX. Unescape the blip.tv redirect URL. --- diff --git a/src/websites/bliptv.rb b/src/websites/bliptv.rb index 116d4f7..d9e4b53 100644 --- a/src/websites/bliptv.rb +++ b/src/websites/bliptv.rb @@ -17,11 +17,12 @@ # require 'src/website' +require 'cgi' class Bliptv < Website VALID_BLIPTV_URL_REGEX = /^(http:\/\/)?([[:alnum:]\-]+\.)?blip\.tv\/file\/(\d+)(.*)?$/ - VALID_BLIPTV_REDIR_URL_REGEX = /^(http:\/\/)?([[:alnum:]\-]+\.)?blip\.tv\/play\/[[:alnum:]]+$/ + VALID_BLIPTV_REDIR_URL_REGEX = /^(http:\/\/)?([[:alnum:]\-]+\.)?blip\.tv\/play\/[[:alnum:]_]+$/ def self.owns_url?(url) return (url =~ VALID_BLIPTV_URL_REGEX || @@ -85,7 +86,7 @@ class Bliptv < Website http.get(uri.request_uri, {}) end - return response['location'] + return CGI::unescape(response['location']) end