Sha256: 2202b70ad1674c477fe5b0f00c57c388b856a5cfd9f5ce0054ee8910046b25aa
Contents?: true
Size: 614 Bytes
Versions: 3
Compression:
Stored size: 614 Bytes
Contents
require 'httparty' module ComixScraper class Scraper include HTTParty def initialize(base_url = 'http://www.previewsworld.com/') @base_url = base_url end def get_new_releases get_data("/shipping/newreleases.txt") end def get_upcoming_releases get_data("/shipping/upcomingreleases.txt") end private def get_data(url) full_url = "#{@base_url}#{url}" puts full_url data = self.class.get(full_url) ComixScraper::Parser.new.parse data.dump.split('\r\n') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
comix_scraper-2.0.0 | lib/comix_scraper/scraper.rb |
comix_scraper-1.0.0 | lib/comix_scraper/scraper.rb |
comix_scraper-0.0.3 | lib/comix_scraper/scraper.rb |