X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fwebsites%2Fveoh.rb;h=1400b71e60732de2a712d38c4f310123fc3552ea;hb=d516b60e0d6b6a212257ed09f0ed1c1972928450;hp=c961d688e213b9500db2ab20726e966b2d896894;hpb=83e06f83d8274cb32a406739839d56e759664b09;p=dead%2Fwhatever-dl.git diff --git a/src/websites/veoh.rb b/src/websites/veoh.rb index c961d68..1400b71 100644 --- a/src/websites/veoh.rb +++ b/src/websites/veoh.rb @@ -18,15 +18,10 @@ require 'src/website' -# Needed to download the page, which is in turn -# needed because it contains the video (redirect) URL. -require 'net/http' -require 'uri' - 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 @@ -58,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? @@ -77,14 +72,4 @@ class Veoh < Website end - def get_page_data(url) - uri = URI.parse(url) - - response = Net::HTTP.start(uri.host, uri.port) do |http| - http.get(uri.path) - end - - return response.body - end - end