X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fwebsites%2Fveoh.rb;h=951d87dabc9975dc959bd2d327f25acbd8bcd0bc;hb=8e886df259246365023322b78f58e4037cb536a4;hp=5830e8f5c40d7b430a9139d18aea73c69f4438e1;hpb=e756e0b650774f2503702512ccdc02e86eee1788;p=dead%2Fwhatever-dl.git diff --git a/src/websites/veoh.rb b/src/websites/veoh.rb index 5830e8f..951d87d 100644 --- a/src/websites/veoh.rb +++ b/src/websites/veoh.rb @@ -21,7 +21,7 @@ require 'src/website' class Veoh < Website - VALID_VEOH_URL_REGEX = /^(http:\/\/)?(www\.)?veoh\.com\/videos\/([[:alnum:]]+)$/ + VALID_VEOH_URL_REGEX = /^(http:\/\/)?(www\.)?veoh\.com\/.*?(v[[:alnum:]]+)$/ def self.owns_url?(url) return url =~ VALID_VEOH_URL_REGEX @@ -53,7 +53,7 @@ class Veoh < Website protected; def parse_video_id() - video_id_regex = /[[:alnum:]]+$/ + video_id_regex = /v[[:alnum:]]+$/ matches = video_id_regex.match(@url) video_id = matches[0] if not matches.nil? @@ -66,7 +66,7 @@ class Veoh < Website def parse_redirect_url(page_data) redirect_url_regex = /fullPreviewHashPath=\"(.*?)\"/ matches = redirect_url_regex.match(page_data) - redirect_url = matches[1] if not (matches.nil? || matches.length < 1) + redirect_url = matches[1] if not matches.nil? || matches.length < 2 return redirect_url end