Created
April 11, 2016 10:57
-
-
Save fanweixiao/9c77b7123f4cee456d9de400658003d5 to your computer and use it in GitHub Desktop.
icarenewlife fether
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url=$1 | |
echo "Parsing: $url" | |
id=$(curl -s $url | ggrep -Po '\/\Khttp\:\/\/.*'| cut -c52-69) | |
echo "id=$id" | |
img_url="http://www.icarenewlife.com/articles/image/default/"$id"jpg" | |
mp3_url="http://www.icarenewlife.com/share/audio/"$id"mp3" | |
echo "Fetching Image: $img_url" | |
wget --quiet $img_url | |
echo "Fetching mp3: $mp3_url" | |
wget --quiet $mp3_url | |
echo "DONE!!\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment