]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/commitdiff
Add a missing character to VALID_BLIPTV_REDIR_URL_REGEX.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 18 Oct 2010 03:28:20 +0000 (23:28 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 18 Oct 2010 03:28:20 +0000 (23:28 -0400)
Unescape the blip.tv redirect URL.

src/websites/bliptv.rb

index 116d4f7623779b9bca0876c765df42dd0a0d613a..d9e4b53682dc4445347bae0aca871960963e5cf4 100644 (file)
 #
 
 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