Added a test for the new behavior.
class Youtube < Website
- VALID_YOUTUBE_URL_REGEX = /^(http:\/\/)?(www\.)?youtube\.com\/((watch\?v=)|(v\/))[a-z0-9_\-]+(\&.*)?\#?$/i
+ VALID_YOUTUBE_URL_REGEX = /^(http:\/\/)?(www\.)?(in\.)?youtube\.com\/((watch\?v=)|(v\/))[a-z0-9_\-]+(\&.*)?\#?$/i
def self.owns_url?(url)
return url =~ VALID_YOUTUBE_URL_REGEX
assert(Youtube.owns_url?('http://www.youtube.com/v/K9iDMcmm0tE'))
assert(Youtube.owns_url?('http://www.youtube.com/watch?v=83-hlYMH1XE'))
assert(Youtube.owns_url?('http://www.youtube.com/watch?v=83-hlYMH1XE&feature=dir'))
+ assert(Youtube.owns_url?('http://in.youtube.com/watch?v=VcydqSpYN00&feature=channel_page'))
end