Created
November 5, 2014 08:02
-
-
Save lsongdev/e1bb0ad6539e961cef2f to your computer and use it in GitHub Desktop.
QQ Zone auto like .
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
| #!/usr/bin/env bash | |
| # ~$ ./auto-like.sh AWjSRV4NJ6K1UqL9m4KiH-yf | |
| # ~$ like OK | |
| SID=$1 | |
| URL="http://ish.z.qq.com/infocenter_v2.jsp?sid=$SID" | |
| echo $URL | |
| LIKE_URL=`curl -s $URL | grep -o 'http://[^"]*' | grep like_action | sed 's/amp;//g'` | |
| if [[ -z $LIKE_URL ]]; then | |
| echo '!! Error !!' | |
| exit 2; | |
| fi | |
| for url in $LIKE_URL; do | |
| LIKE_RESULT=`curl -s $url | grep "赞"` | |
| if [[ -n $LIKE_RESULT ]]; then | |
| if [[ -n `echo $LIKE_RESULT | grep '取消'` ]]; then | |
| echo 'un-like OK' | |
| else | |
| echo 'like OK' | |
| fi | |
| else | |
| echo 'Error' | |
| exit 1; | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment