From: Michael Orlitzky Date: Sat, 4 Jun 2011 00:52:22 +0000 (-0400) Subject: Update the generic URL parser to avoid matching single and double quotes in URLs. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fwhatever-dl.git;a=commitdiff_plain;h=58d554d481fe3bef764040be061bd13aeebb15ef Update the generic URL parser to avoid matching single and double quotes in URLs. --- diff --git a/src/websites/generic.rb b/src/websites/generic.rb index 88fa515..51fe078 100644 --- a/src/websites/generic.rb +++ b/src/websites/generic.rb @@ -48,7 +48,7 @@ class Generic < Website end def parse_video_url(page_data) - full_video_url_regex = /(http:\/\/.+?\.(flv|mp4))/i + full_video_url_regex = /(http:\/\/[^\"\']+?\.(flv|mp4))/i matches = full_video_url_regex.match(page_data) if not (matches.nil? || matches.length < 2)