1
1
Fork 0

changed parsing in youtube2mp3

This commit is contained in:
David Starzengruber 2011-01-02 14:31:56 +01:00
parent f7eec5eb3e
commit 0a37b70f9b
1 changed files with 6 additions and 4 deletions

View File

@ -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"