看,参数表都有了,随便一条命令就能完成全部工作:
$ curl "
http://ezfm.china-plus.net/index.php?m=index&a=cat_list&cid=224" -s | jq '.data[]|.title,.url' -r
飞鱼秀-电影催泪
http://123.56.91.34/Uploads/media/20150414/20150414115215_89404.mp3
飞鱼秀-如释重负
http://123.56.91.34/Uploads/media/20150413/20150413140314_46952.mp3
飞鱼秀-桌面背景
http://123.56.91.34/Uploads/media/20150410/20150410134301_66025.mp3
飞鱼秀-等我老了
http://123.56.91.34/Uploads/media/20150409/20150409114612_70668.mp3
飞鱼秀-初恋这件小事
http://123.56.91.34/Uploads/media/20150408/20150408133335_71534.mp3
飞鱼秀-垃圾食品
http://123.56.91.34/Uploads/media/20150407/20150407125619_19902.mp3
飞鱼秀-中国特色
……
甚至直接生成podcast feed:
$ curl "
http://ezfm.china-plus.net/index.php?m=index&a=cat_list&cid=224" -s | jq '.data[]|"<item>\n<title>\(.title)</title>\n<link>\(.url)</link>\n<guid>\(.url)</guid></item>"' -r
<item>
<title>飞鱼秀-电影催泪</title>
<link>http://123.56.91.34/Uploads/media/20150414/20150414115215_89404.mp3</link>
<guid>http://123.56.91.34/Uploads/media/20150414/20150414115215_89404.mp3</guid></item>
<item>
<title>飞鱼秀-如释重负</title>
<link>http://123.56.91.34/Uploads/media/20150413/20150413140314_46952.mp3</link>
<guid>http://123.56.91.34/Uploads/media/20150413/20150413140314_46952.mp3</guid></item>
<item>
……
想干啥干啥。