<commit_before># Part of get-flash-videos. See get_flash_videos for copyright.
package FlashVideo::Site::Svtplay;

use strict;
use warnings;

use FlashVideo::Utils;
use FlashVideo::JSON;
use HTML::Entities;

our $VERSION = '0.03';
sub Version() { $VERSION;}

my $bitrate_index = {
  high   => 0,
  medium => 1,
  low    => 2
};

sub find_video_svt {
  my ($self, $browser, $embed_url, $prefs, $oppet_arkiv) = @_;
  my @rtmpdump_commands;

  if ($browser->uri->as_string !~ m/(video|klipp)\/([0-9]*)/) {
    die "No video id found in url";
  }
  my $vid_type = $1;
  my $video_id = $2;
  $browser->content =~ m/<title>(.+)<\/title>/;
  my $name = decode_entities($1);
  my $info_url = $oppet_arkiv ?
                 "http://www.oppetarkiv.se/video/$video_id?output=json" :<commit_msg>Update version handle short clips<commit_after># Part of get-flash-videos. See get_flash_videos for copyright.
package FlashVideo::Site::Svtplay;

use strict;
use warnings;

use FlashVideo::Utils;
use FlashVideo::JSON;
use HTML::Entities;

our $VERSION = '0.04';
sub Version() { $VERSION;}

my $bitrate_index = {
  high   => 0,
  medium => 1,
  low    => 2
};

sub find_video_svt {
  my ($self, $browser, $embed_url, $prefs, $oppet_arkiv) = @_;
  my @rtmpdump_commands;

  if ($browser->uri->as_string !~ m/(video|klipp)\/([0-9]*)/) {
    die "No video id found in url";
  }
  my $vid_type = $1;
  my $video_id = $2;
  $browser->content =~ m/<title>(.+)<\/title>/;
  my $name = decode_entities($1);
  my $info_url = $oppet_arkiv ?
                 "http://www.oppetarkiv.se/video/$video_id?output=json" :
{'fraction_non_alphanumeric': 0.17884130982367757, 'fraction_numerical': 0.013853904282115869, 'mean_word_length': 3.63265306122449, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '5912830', 'n_tokens_mistral': 630, 'n_tokens_neox': 618, 'n_words': 142}