Code: Select all
#!/bin/bash
x="00$$/%(title)s.(ext)s"
"
url="http://localhost/00$$/"
youtube-dl --rate-limit 15M --extract-audio --audio-format mp3 --output=$x "$1"
oput1="mp3.lst"
mpp="/*.mp3"
find /locahost/00$$/ -name "*.mp3" > $oput1
#mkdir 00$$
fil=`head -1 $oput1`
echo "http:/$fil"
rm -f $oput1
mv /localhost/00* /var/www/html/
exit
#
bind pub -|- !dl pub_get
proc pub_get {nick host hand chan text} {
putserv "NOTICE $nick :Searching for $text. Please stand by..."
set runcmd [exec /localhost/tt3.sh "$text"]
if {[catch $runcmd res]} {
putserv "NOTICE $nick:No matches for $text"
}
putserv "NOTICE $nick : $line $res"
putlog "$res"
}
===========================
[00:40] <slashker> !dl CvBfHwUxHIk
[00:40] -BotMp3- Searching for CvBfHwUxHIk. Please stand by...
log error
[00:40:20] Tcl error [pub_get]: http:/
ERROR: u'CvBfHwUxHIk$' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:CvBfHwUxHIk$" ) to search YouTube
find: `/localhost/0012206/': No such file or directory
mv: cannot stat ‘/localhost/00*’: No such file or directory
Thanks