From 0d4bcd362455bbbe245f3b1b8a5b7bc1f4ed2ac3 Mon Sep 17 00:00:00 2001 From: trizen Date: Sat, 15 Feb 2020 08:39:16 +0200 Subject: Support input URLs --- lib/WWW/StrawViewer.pm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'lib/WWW/StrawViewer.pm') diff --git a/lib/WWW/StrawViewer.pm b/lib/WWW/StrawViewer.pm index 42206d1..de13099 100644 --- a/lib/WWW/StrawViewer.pm +++ b/lib/WWW/StrawViewer.pm @@ -130,6 +130,39 @@ sub _our_smartmatch { return 0; } +sub basic_video_info_fields { + join(',', + qw( + title + videoId + description + published + publishedText + viewCount + likeCount + dislikeCount + genre + author + authorId + lengthSeconds + rating + liveNow + ) + ) +} + +sub extra_video_info_fields { + my ($self) = @_; + join(',', + $self->basic_video_info_fields, + qw( + subCountText + captions + isFamilyFriendly + ) + ); +} + { no strict 'refs'; -- cgit v1.2.3