<commit_before>module Onebox
  module Engine
    class TwitterOnebox
      include Engine
      include HTML

      matches do
        http
        maybe("www.")
        domain("twitter")
        tld("com")
        anything
        has("/status/")
      end

      private

      def data
        {
          link: link,
          domain: "http://www.twitter.com",
          badge: "t",
          title: raw.css(".tweet-text").inner_text,
          timestamp: raw.css(".metadata span").inner_text,
          user: raw.css(".stream-item-header .username").inner_text,
          avatar: raw.css(".avatar")[2]["src"],
          favorites: raw.css(".stats li .request-favorited-popup").inner_text,
          retweets: raw.css(".stats li .request-retweeted-popup").inner_text
        }
      end
    end
  end
end
<commit_msg>We want the username to be the title, not hte status<commit_after>module Onebox
  module Engine
    class TwitterOnebox
      include Engine
      include HTML

      matches do
        http
        maybe("www.")
        domain("twitter")
        tld("com")
        anything
        has("/status/")
      end

      private

      def data
        {
          link: link,
          domain: "http://www.twitter.com",
          badge: "t",
          tweet: raw.css(".tweet-text").inner_text,
          timestamp: raw.css(".metadata span").inner_text,
          title: raw.css(".stream-item-header .username").inner_text,
          avatar: raw.css(".avatar")[2]["src"],
          favorites: raw.css(".stats li .request-favorited-popup").inner_text,
          retweets: raw.css(".stats li .request-retweeted-popup").inner_text
        }
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.1278240190249703, 'fraction_numerical': 0.0011890606420927466, 'mean_word_length': 1.7818181818181817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3813044', 'n_tokens_mistral': 494, 'n_tokens_neox': 491, 'n_words': 110}