<commit_before>module Funky
  # @api private
  module HTML
    class Page
      def get(video_id:)
        body = response_for(video_id).body
        if body.include? '<meta name="description"'
          body
        else
          raise ContentNotFound, 'Please double check the ID and try again.'
        end
      end

    private

      def response_for(video_id)
        uri = uri_for video_id
        request = Net::HTTP::Get.new(uri.request_uri)
        Net::HTTP.start(uri.host, 443, use_ssl: true) do |http|
          http.request request
        end
      rescue SocketError => e
        raise ConnectionError, e.message
      end

      def uri_for(video_id)
        URI::HTTPS.build host:  'www.facebook.com',
                         path:  '/video.php',
                         query: "v=#{video_id}"
      end
    end
  end
end<commit_msg>set locale field as en_US<commit_after>module Funky
  # @api private
  module HTML
    class Page
      def get(video_id:)
        body = response_for(video_id).body
        if body.include? '<meta name="description"'
          body
        else
          raise ContentNotFound, 'Please double check the ID and try again.'
        end
      end

    private

      def response_for(video_id)
        uri = uri_for video_id
        request = Net::HTTP::Get.new(uri.request_uri)
        Net::HTTP.start(uri.host, 443, use_ssl: true) do |http|
          http.request request
        end
      rescue SocketError => e
        raise ConnectionError, e.message
      end

      def uri_for(video_id)
        URI::HTTPS.build host:  'www.facebook.com',
                         path:  '/video.php',
                         query: "v=#{video_id}&locale=en_US"
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08876080691642652, 'fraction_numerical': 0.00345821325648415, 'mean_word_length': 1.7776, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7354045', 'n_tokens_mistral': 525, 'n_tokens_neox': 504, 'n_words': 137}