Permalink
Browse files

require Scraped

We don't actually _use_ it yet, but it provides us with String.tidy and Nokogiri
  • Loading branch information...
tmtmtmtm committed Jan 7, 2017
1 parent da9dd84 commit 2b238ba9a42a1e4f430f92493d2feadad6eeae21
Showing with 2 additions and 8 deletions.
  1. +2 −8 scraper.rb
View
@@ -2,20 +2,14 @@
# encoding: utf-8
# frozen_string_literal: true
require 'scraperwiki'
require 'nokogiri'
require 'pry'
require 'scraped'
require 'scraperwiki'
# require 'open-uri/cached'
# OpenURI::Cache.cache_path = '.cache'
require 'scraped_page_archive/open-uri'
class String
def tidy
gsub(/[[:space:]]+/, ' ').strip
end
end
def noko_for(url)
Nokogiri::HTML(open(url).read)
end

0 comments on commit 2b238ba

Please sign in to comment.