<commit_before>module TvdbParty
  class Episode
    attr_accessor :id, :season_number, :number, :name, :overview, :air_date, :thumb, :guest_stars, :director, :writer

    def initialize(options={})
      @id = options["id"]
      @season_number = options["SeasonNumber"]
      @number = options["EpisodeNumber"]
      @name = options["EpisodeName"]
      @overview = options["Overview"]
      @air_date = Date.parse(options["FirstAired"]) if options["FirstAired"]
      @thumb = "http://thetvdb.com/banners/" + options["filename"] if options["filename"].to_s != ""
      @guest_stars = options["GuestStars"][1..-1].split("|")
      @director = options["Director"]
      @writer = options["Writer"]
    end
  end
end<commit_msg>protect against empty guest stars<commit_after>module TvdbParty
  class Episode
    attr_accessor :id, :season_number, :number, :name, :overview, :air_date, :thumb, :guest_stars, :director, :writer

    def initialize(options={})
      @id = options["id"]
      @season_number = options["SeasonNumber"]
      @number = options["EpisodeNumber"]
      @name = options["EpisodeName"]
      @overview = options["Overview"]
      @air_date = Date.parse(options["FirstAired"]) if options["FirstAired"]
      @thumb = "http://thetvdb.com/banners/" + options["filename"] if options["filename"].to_s != ""
      @guest_stars = options["GuestStars"][1..-1].split("|") if options["GuestStars"]
      @director = options["Director"]
      @writer = options["Writer"]
    end
  end
end
{'fraction_non_alphanumeric': 0.1667778519012675, 'fraction_numerical': 0.00266844563042028, 'mean_word_length': 4.05050505050505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4088869', 'n_tokens_mistral': 488, 'n_tokens_neox': 461, 'n_words': 95}