Sha256: 4103b574a2ea8cd561731c956ed4c603dd3de1b75a8e646712fd40dd09c515d5
Contents?: true
Size: 298 Bytes
Versions: 2
Compression:
Stored size: 298 Bytes
Contents
require 'open-uri' require 'nokogiri' module PictureFrom module Crawlers class BaseCrawler class Page def open_url(url) uri = URI.escape(url) Nokogiri::HTML open(uri) rescue OpenURI::HTTPError nil end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
picture_from-1.0.1 | lib/picture_from/crawlers/base_crawler.rb |
picture_from-1.0.0 | lib/picture_from/crawlers/base_crawler.rb |