class FronkinBandcampScraper::Scraper
Attributes
artist[R]
doc[R]
release[R]
Public Class Methods
new(url)
click to toggle source
# File lib/fronkin_bandcamp_scraper/scraper.rb, line 10 def initialize(url) @doc = Nokogiri::HTML(open(url), nil, 'utf-8') { |config| config.noblanks } scrape end
Private Instance Methods
scrape()
click to toggle source
# File lib/fronkin_bandcamp_scraper/scraper.rb, line 17 def scrape @release = Release.new(doc) @artist = Artist.new do |a| a.name = doc.css('div#bio-container span.title').text a.photo = doc.css('div#bio-container div.bio-pic a.popupImage').attribute('href').value a.location = doc.css('div#bio-container span.location').text end end