Add og props

This commit is contained in:
2024-02-02 18:44:15 +11:00
parent 6bbdca228e
commit d26c3759ac
3 changed files with 19 additions and 0 deletions

View File

@@ -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
""