class TopBoardGames::Scraper
Public Instance Methods
get_main_page()
click to toggle source
# File lib/TopBoardGames/scraper.rb, line 3 def get_main_page #main_page will return the information the info for the list (ie. Rank, Title, etc) Nokogiri::HTML(open("https://www.boardgamegeek.com/browse/boardgame")) end
make_boardgames()
click to toggle source
# File lib/TopBoardGames/scraper.rb, line 12 def make_boardgames #this will create new board games and iterate of the main_page scrape_topboardgames.each {|row| TopBoardGames::Game.new_from_main_page(row)} end
scrape_topboardgames()
click to toggle source
# File lib/TopBoardGames/scraper.rb, line 8 def scrape_topboardgames self.get_main_page.css(".collection_table tr#row_") end