Sha256: 81c71624830d14c11d4ade253eea4bfa3720d2843e39bae1de895c846b91a0f4

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

class Adventures::Scraper
	def get_page(activity, state)
		doc = Nokogiri::HTML(open("https://www.theoutbound.com/#{state}/#{activity_url_creator(activity)}"))	
	end
	
	def activity_url_creator(activity)
		activity.gsub(' ', '-')
	end

	def scrape_adventure(activity, state)
		self.get_page(activity, state).css("div.adventure-card--image")
	end

	def gather_adventures(activity, state)
		scrape_adventure(activity, state).each do |a|
		 	Adventures::Adventure.new_from_scrape(a)
		end
	end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adventures-0.1.0 lib/adventures/scraper.rb