I'm not sure what I'm doing wrong. I'm new to coding so it could be something very simple. I've looked around and can't find a solution. It's in the first line in self.scrape_mainpage function.
require 'HTTParty'
require 'Nokogiri'
require 'byebug'
require 'sqlite3'
class Scraper
attr_accessor :page
restaurants = []
def initialize(page="https://www.tripadvisor.com/Restaurants-g31892-Rogers_Arkansas.html")
@page = page
url_convert
end
def url_convert
unparsed_page = HTTParty.get(@page)
@url = Nokogiri::HTML(unparsed_page.body)
end
def self.scrape_mainpage
href = @url.css('_15_ydu6b')[0]["href"].text
byebug
end
end