|
|
@ -83,9 +83,9 @@ class FetchLinkCardService < BaseService
|
|
|
|
else
|
|
|
|
else
|
|
|
|
document = Nokogiri::HTML(@status.text)
|
|
|
|
document = Nokogiri::HTML(@status.text)
|
|
|
|
links = document.css(':not(.quote-inline) > a')
|
|
|
|
links = document.css(':not(.quote-inline) > a')
|
|
|
|
|
|
|
|
links.filter_map { |a| Addressable::URI.parse(a['href']) unless skip_link?(a) }.filter_map(&:normalize)
|
|
|
|
links.filter_map { |a| Addressable::URI.parse(a['href']) unless skip_link?(a) }.filter_map(&:normalize)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
urls.reject { |uri| bad_url?(uri) }.first
|
|
|
|
urls.reject { |uri| bad_url?(uri) }.first
|
|
|
|
end
|
|
|
|
end
|
|
|
|