matches = filename_regex.match(@url)
# Overwrite the default if our regex worked.
- filename = matches[1] if not (matches.nil? || matches.length < 1)
+ filename = matches[1] if not matches.nil? || matches.length < 1
return (filename + '.flv')
end
video_url_regex = /flashvars\.file = "(http:\/\/.*\.flv)"/i
matches = video_url_regex.match(page_data)
- if not (matches.nil? || matches.length < 2)
+ if not matches.nil? || matches.length < 2
return matches[1]
else
raise StandardError.new('Could not find the "file" Flash variable.');