Navigation Menu

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 26, 2017
1 parent 051785b commit af99880
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions scraper.rb
Expand Up @@ -2,21 +2,14 @@
# encoding: utf-8
# frozen_string_literal: true

require 'nokogiri'
require 'open-uri'
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 af99880

Please sign in to comment.