Add og props
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
require "rexml/parsers/pullparser"
|
||||
require "sanitize"
|
||||
require "nokogiri"
|
||||
|
||||
module Adamantium
|
||||
module Decorators
|
||||
@@ -38,6 +39,16 @@ module Adamantium
|
||||
__getobj__.photos.select { |p| p["value"].end_with?("mp4") }
|
||||
end
|
||||
|
||||
def key_image
|
||||
if photos?
|
||||
return photos.first["url"]
|
||||
end
|
||||
|
||||
doc = Nokogiri::HTML(content)
|
||||
images = doc.at("//img")
|
||||
images.first[1] if images
|
||||
end
|
||||
|
||||
def prefix_emoji
|
||||
if name
|
||||
""
|
||||
|
Reference in New Issue
Block a user