必要なモジュール類
bash,wget,ffmpeg,youtube-dl
#! /bin/bash
#
# Tver Download Script
# MITEEL Co.,LTD (C)2022
#
#
#
A0=`wget -q -O - $1`
echo "Connecting to tver Please Wait....";
A1=`echo $A0 | awk '
BEGIN{iflg=0;}
{
delmit="addPlayer";
split($0,a,"addPlayer");
split(a[2],b,";");
print substr(b[1],2,length(b[1])-2);
}
' `
# 1: data-account
# 2: data-player
# 3: main-url-code
# 4: data-account
# 5: data-video-id
# 6: title-1
# 7: title-2
# 8: broadcaster
# 9: broadcaster-comment
A2=`echo $A1 | awk '
{
i=split($0,a,",");
if(i>10){
split(a[4],b,"\x27");
dataaccount = b[2];
split(a[5],c,"\x27");
datavideoid = c[2];
if(datavideoid ~ /^[0-9]{13}$/){
}else{
datavideoid="ref:" datavideoid;
}
if(length(dataaccount)==13){
print "youtube-dl http://players.brightcove.net/" dataaccount "/default_default/index.html?videoId=" datavideoid;
}
}
}
'`
if [ ${#A2} -gt 20 ]; then
$A2
fi