We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a993fc commit 592309cCopy full SHA for 592309c
lib/link_thumbnailer/scrapers/base.rb
@@ -62,6 +62,11 @@ def modelize(node, text = nil)
62
model_class.new(node, text)
63
end
64
65
+ def scheme
66
+ # Extract the schema from the url
67
+ uri = URI.parse("#{@website.url}")
68
+ uri.scheme
69
+ end
70
71
72
lib/link_thumbnailer/scrapers/opengraph/video.rb
@@ -22,7 +22,7 @@ def value
22
private
23
24
def model
25
- nodes.map { |n| modelize(n, n.attributes['content'].to_s) }
+ nodes.map { |n| modelize(n, n.attributes['content'].to_s) if n.attributes['content'].to_s.start_with? scheme }
26
27
28
def modelize(node, text = nil)
0 commit comments