Sha256: e537ecc53448f574561b1d3b4cd630de1e5ee3e4b72c4bed4909bf364cce20d9
Contents?: true
Size: 501 Bytes
Versions: 64
Compression:
Stored size: 501 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
64 entries across 64 versions & 1 rubygems