Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
WWW::YoutubeViewer::GeUsertContributed Perl DWWW::YoutubeViewer::GetCaption(3)

NAME
       WWW::YoutubeViewer::GetCaption -	Save the YouTube closed	captions as
       .srt files for a	videoID.

SYNOPSIS
	   use WWW::YoutubeViewer::GetCaption;

	   my $yv_cap =	WWW::YoutubeViewer::GetCaption->new(%opts);
	   my $file = $yv_cap->save_caption($videoID);

SUBROUTINES/METHODS
   new(%opts)
       Options:

       captions	=> []
	   The captions	data.

	    [
	     # ...
	       {
		 baseUrl => "https://...",
		 isTranslatable	=> '...',
		 languageCode => "ru",
		 name => { simpleText => "Russian" },
		 vssId => ".ru",
	       },
	     # ...
	    ]

       captions_dir => "."
	   Where to save the closed captions.

       languages => [qw(en es ro jp)]
	   Preferred languages.	First found is saved and returned.

   find_caption_data()
       Find a caption data, based on the preferred languages.

   sec2time(@seconds)
       Convert a list of seconds to .srt times.

   xml2srt($xml_string)
       Convert the XML data to SubRip format.

   get_xml_data($caption_data)
       Get the XML content for a given caption data.

   save_caption($video_ID)
       Save the	caption	in a .srt file and return its file path.

AUTHOR
       Trizen, "<echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64	-d>"

SUPPORT
       You can find documentation for this module with the perldoc command.

	   perldoc WWW::YoutubeViewer::GetCaption

LICENSE	AND COPYRIGHT
       Copyright 2012-2015 Trizen.

       This program is free software; you can redistribute it and/or modify it
       under the terms of either: the GNU General Public License as published
       by the Free Software Foundation;	or the Artistic	License.

       See <http://dev.perl.org/licenses/> for more information.

perl v5.32.1			  2021-03-01 WWW::YoutubeViewer::GetCaption(3)

NAME | SYNOPSIS | SUBROUTINES/METHODS | AUTHOR | SUPPORT | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=WWW::YoutubeViewer::GetCaption&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help