Thursday, 14 January 2010

better reading of a youtube video page, the SWF_ARGS

this command can get the useful information in a youtube page
for someone to download flv
parse it, etc

curl -s "http://www.youtube.com/watch?v=7K49OUtvQOw" | sed -e "/SWF_ARGS/!d" -e "s/,/\r\n/g" -e "s/%3A/:/g" -e "s/%2F/\//g" -e "s/%252C/,/g" -e "s/%3F/?/g" -e "s/%3D/=/g" -e "s/%26/\&/g" -e "s/%2C/,/g" -e "s/%7C/\x7C/g" -e "s/\x7C/\r\n/g"

I am using gnused on windows, so it is \xNN support, NN is hex value of a char, and \r\n for a new line in MS windows
\x7C is vertical bar , and so on

No comments:

Labels

Search This Blog