<commit_before>class TopMovies::Movie
  attr_accessor :title, :rating, :reviews, :url

  def intialize(title, url)
    @title= title
    @url- url
  end

  def self.all
    # Scrape RT's best 100 and return movie stats on input number out of 100
    self.scrape_movies
  end

  def self.scrape_movies
    movies = []

    movies << self.scrape_movie

    # Go to RT's top 100 list
    # extract properties of each movie
    # instantiate movie
    # everytime I get a movie push it into array
    movies
  end

  def self.scrape_top_movies
    doc = Nokogiri::HTML(open("https://www.rottentomatoes.com/top/bestofrt/"))
    binding.pry
  end


end<commit_msg>added title and position scraping- still not working<commit_after>class TopMovies::Movie
  attr_accessor :title, :rating, :reviews, :url

  def intialize(title, url)
    @title= title
    @url- url
  end

  def self.all
    # Scrape RT's best 100 and return movie stats on input number out of 100
    self.scrape_movies
  end

  def self.scrape_movies
    movies = []

    movies << self.scrape_movie

    # Go to RT's top 100 list
    # extract properties of each movie
    # instantiate movie
    # everytime I get a movie push it into array
    movies
  end

  def self.scrape_top_movies
    doc = Nokogiri::HTML(open("https://www.rottentomatoes.com/top/bestofrt/"))
    binding.pry
    #parse into rows to get rating, title, number of reviews
    title = doc.css(".unstyled.articleLink").first.text
    position= doc.css(".bold").text
    rating = doc.css("span.tMeterScore").first.text
  end
end


end
{'fraction_non_alphanumeric': 0.08887468030690537, 'fraction_numerical': 0.011508951406649617, 'mean_word_length': 2.972081218274112, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '735904', 'n_tokens_mistral': 564, 'n_tokens_neox': 516, 'n_words': 161}