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