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 Apr 11, 2017
1 parent 9bfb578 commit 61f63ba
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scraper.rb
Expand Up @@ -2,19 +2,13 @@
# encoding: utf-8
# frozen_string_literal: true

require 'scraped'
require 'scraperwiki'
require 'nokogiri'
require 'pry'

require 'open-uri/cached'
OpenURI::Cache.cache_path = '.cache'

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 61f63ba

Please sign in to comment.