Skip to content

Instantly share code, notes, and snippets.

@missdeer
Created October 17, 2013 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save missdeer/7018821 to your computer and use it in GitHub Desktop.
Save missdeer/7018821 to your computer and use it in GitHub Desktop.
extract hyper links from http://cn.nytimes.com/ homepage and save to Instapaper
curl --socks5 127.0.0.1:7070 http://cn.nytimes.com/ 2>/dev/null | grep -o '<a href="[^"]\+" title="[^"]\+"' | sed -e 's/<a href="//g' | sed -e 's/" title="/ /g' | sed -e 's/"//g' | while read url title
do if [[ ${url:0:5} != "http:" ]]
then
url="http://cn.nytimes.com$url"
fi
echo $url | mail -s "$title" readlater.xxxx@instapaper.com
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment