class StrangerThingsDirectory::LocationScraper

Attributes

doc[RW]
locations[RW]
urls_list[RW]

Public Instance Methods

get_locations() click to toggle source
# File lib/stranger_things_directory/location_scraper.rb, line 11
def get_locations
   self.open_page.css("div#WikiaArticle.WikiaArticle ul.category-page__trending-pages li.category-page__trending-page")
    #binding.pry

end
open_page() click to toggle source
# File lib/stranger_things_directory/location_scraper.rb, line 6
def open_page
   Nokogiri::HTML(open("https://strangerthings.fandom.com/wiki/Category:Locations"))
    #binding.pry
end
send_locations() click to toggle source
# File lib/stranger_things_directory/location_scraper.rb, line 16
    def send_locations
        
        get_locations.each do |location|
        StrangerThingsDirectory::Locations.new_location(location)
    end
end