`twitter.com` sources worked but `www.twitter.com` didn't. Also match the URL by class instead of by site name to ensure we match the expected class.
15 lines
255 B
Ruby
15 lines
255 B
Ruby
# frozen_string_literal: true
|
|
|
|
# @see Source::URL::TwitPic
|
|
module Sources::Strategies
|
|
class TwitPic < Base
|
|
def match?
|
|
Source::URL::TwitPic === parsed_url
|
|
end
|
|
|
|
def normalize_for_source
|
|
parsed_url.page_url || url
|
|
end
|
|
end
|
|
end
|