From b45a395047ef46761b58b12df1afd9e948a3f786 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 17 Oct 2010 23:28:20 -0400 Subject: [PATCH] Add a missing character to VALID_BLIPTV_REDIR_URL_REGEX. Unescape the blip.tv redirect URL. --- src/websites/bliptv.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.44.2