WWW::Y...aption(3pm)
πΈ NAME πΈ
okay so bestie, this is the WWW::YoutubeViewer::GetCaption page from User Contributed Perl Documentation β yup, the one your man viewer files under WWW::Y...aption(3pm). Its whole thing is saving YouTube closed captions as .srt files for a videoID. That's the vibe. π
β¨ SYNOPSIS β¨
use WWW::YoutubeViewer::GetCaption;
my $yv_cap = WWW::YoutubeViewer::GetCaption->new(%opts);
my $file = $yv_cap->save_caption($videoID);
π¦ SUBROUTINES/METHODS π¦
new(%opts)
okay so you make a new one with %opts, and here are the options, bestie:
π Options π
captions => []β the captions data. It looks like this:
[
# ...
{
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. periodt.
find_caption_data()
Finds a caption data, based on the preferred languages. π§
sec2time(@seconds)
Converts a list of seconds to .srt times. β±οΈβ¨
xml2srt($xml_string)
Converts the XML data to SubRip format. π
save_caption($video_ID)
Saves the caption in a .srt file and returns its file path. π«Ά
π AUTHOR π
Trizen, "<echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>".
π SUPPORT π
You can find documentation for this module with the perldoc command. No cap:
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 <https://dev.perl.org/licenses/> for more information.
xoxo, your Perl bestie π«Ά β this was served up by perl v5.42.2, dated 2026-02-15, under the WWW::Y...aption(3pm) label. slay. πβ¨
π¦ where this page comes from
- alpine 3.24: youtube-viewer-doc 3.11.6-r1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms