changed parsing in youtube2mp3
This commit is contained in:
parent
f7eec5eb3e
commit
0a37b70f9b
|
@ -67,11 +67,13 @@ fi
|
|||
|
||||
# parse link for title
|
||||
curl "$link" --output tmp.txt
|
||||
rawtitle=$(cat tmp.txt | grep 'meta name="title"')
|
||||
rawtitle=$(cat tmp.txt | w3m -dump -T text/html | sed -n '5p')
|
||||
title=$rawtitle
|
||||
#rawtitle=$(cat tmp.txt | grep 'meta name="title"')
|
||||
rm tmp.txt
|
||||
count=${#rawtitle}
|
||||
length=$(($count-36))
|
||||
title=${rawtitle:34:$length}
|
||||
#count=${#rawtitle}
|
||||
#length=$(($count-36))
|
||||
#title=${rawtitle:34:$length}
|
||||
|
||||
echo
|
||||
echo "Parsed videotitle = $title"
|
||||
|
|
Loading…
Reference in New Issue