Created
October 17, 2013 03:26
-
-
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
This file contains 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
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