Skip to content

Instantly share code, notes, and snippets.

@fanweixiao
Created April 11, 2016 10:57
Show Gist options
  • Save fanweixiao/9c77b7123f4cee456d9de400658003d5 to your computer and use it in GitHub Desktop.
Save fanweixiao/9c77b7123f4cee456d9de400658003d5 to your computer and use it in GitHub Desktop.
icarenewlife fether
#!/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