WWW::Y...::Utils(3pm)
πΈ NAME πΈ
okay so this is the WWW::Y...::Utils(3pm) page β User Contributed Perl Documentation, bestie β for WWW::YoutubeViewer::Utils, and it is literally Various utils. Thatβs the whole vibe: little helper routines doing their thing.
β¨ SYNOPSIS β¨
The starter pack is exactly this:
use WWW::YoutubeViewer::Utils;
my $yv_utils = WWW::YoutubeViewer::Utils->new(%opts);
print $yv_utils->format_time(3600);
No cap, that print is serving format_time(3600) realness. π
π SUBROUTINES/METHODS π
π new(%opts)
The new(%opts) situation comes with these options:
thousand_separator => ""β character used as thousand separator.months => []β month names forformat_date().youtube_url_format => ""β a youtube URL format forsprintf(format, videoID).
π¦ extension($type)
Returns the extension format from a given type.
Like, hand it a string like 'video/webm;+codecs="vp9"' and it returns 'webm' β just the extension part, periodt.
β° format_time($sec)
Returns time from seconds. Thatβs the whole thing. The synopsis uses 3600, iykyk.
π°οΈ format_duration($duration)
Return time (01:20:10) from duration (PT1H20M10S). So yeah: duration string in, time string out.
π
format_date($date)
Return string "04 May 2010" from "2010-05-04T00:25:55.000Z". Itβs giving date glow-up. β¨
π§ date_to_age($date)
Return the (approximated) age for a given date of the form "2010-05-04T00:25:55.000Z".
β
has_entries($result)
Returns true if a given result has entries. Simple vibe check.
π§Ό normalize_filename($title, $fat32safe)
Replace file-unsafe characters and trim spaces. Thatβs the cleanup era, bestie.
π format_text(%opt)
Formats a text with information from streaming and video info.
The structure of %opt is:
(
streaming => HASH,
info => HASH,
text => STRING,
escape => BOOL,
fat32safe => BOOL,
)
π’ set_thousands($num)
Return the number with thousand separators.
π¬ get_video_id($info)
Get videoID.
π get_description($info)
Get description.
π·οΈ get_title($info)
Get title.
πΌοΈ get_thumbnail_url($info;$type='default')
Get thumbnail URL.
π«Ά AUTHOR π«Ά
Author: Trizen, "<echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>".
π SUPPORT π
You can find documentation for this module with the perldoc command.
perldoc WWW::YoutubeViewer::Utils
π LICENSE AND COPYRIGHT π
Copyright 2012-2020 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.
cute sign-off: this page is from perl v5.42.2, dated 2026-02-15, and itβs the WWW::Y...::Utils(3pm) manual. byeee, bestie π
π
π¦ 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