本帖最后由 chenglu 于 2013-1-16 16:19 编辑
- #!/bin/bash
- username=''
- password=''
- feed=''
- feed="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$feed")"
- unixtime=`date +'%s'`
- token=`curl -s -d accountType=GOOGLE -d Email=$username -d Passwd="$password" -d service=reader https://www.google.com/accounts/ClientLogin | grep 'Auth=' | sed 's/Auth=//'`
- curl -s "http://www.google.com/reader/api/0/stream/contents/feed/$feed?n=1&refresh=true&ck=$unixtime" -H "Authorization:GoogleLogin auth=$token" &> /dev/null
复制代码 |