Skip to content

Commit

Permalink
require Scraped
Browse files Browse the repository at this point in the history
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 2b238ba
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scraper.rb
Expand Up @@ -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
Expand Down

0 comments on commit 2b238ba

Please sign in to comment.