Sha256: 73a26121b8cc013b4690af59d08c50abd6830c739962f1efbc2c7ae5038fa086
Contents?: true
Size: 509 Bytes
Versions: 29
Compression:
Stored size: 509 Bytes
Contents
module Onebox module Engine class DoubanOnebox include Engine include LayoutSupport include HTML matches_regexp(/^(https?:\/\/)?([\da-z\.-]+)(douban.com\/)(.)+\/?$/) private def data { link: link, title: raw.css('title').text.gsub("\n",'').strip(), image: raw.css('img[rel*="v:"]').first['src'], description: raw.css('meta[name=description]').first['content'], } end end end end
Version data entries
29 entries across 29 versions & 1 rubygems