Last active
December 28, 2020 03:32
-
-
Save BFDZ/a0167680e246f0be3248c9748b81d2ef to your computer and use it in GitHub Desktop.
字幕组网站签到
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
#!/bin/bash | |
ACCOUNT="user" | |
PASSWORD="123456" | |
######################################### | |
function urlEncode() { | |
python -c " | |
import urllib, commands, os; | |
var = commands.getoutput('echo \'$1\''); | |
var = urllib.quote_plus(var); | |
os.system('echo ' + var);" | |
} | |
DOMAIN="http://www.rrys2020.com/" | |
COOKIE="zimuzu.cookie" | |
REMEMBER="1" | |
REDIRECT="$DOMAIN/user/sign" | |
ExpectedResponseText='{"status":0,"info":"","data":0}' | |
RetryCount=1 | |
# 登錄 | |
curl -d "account=$(urlEncode $ACCOUNT)&password=$(urlEncode $PASSWORD)&remember=$(urlEncode $REMEMBER)&url_back=$(urlEncode $REDIRECT)" \ | |
-c "$COOKIE" -s "$DOMAIN/User/Login/ajaxLogin" | |
echo '' | |
sleep 1 | |
# 要先打開簽到頁面 | |
curl -s --cookie "$COOKIE" "$REDIRECT" > /dev/null | |
curl -s --cookie "$COOKIE" "$DOMAIN/user/login/getCurUserTopInfo" | |
echo '' | |
sleep 1 | |
#查看积分 | |
var=$(curl -s --cookie "$COOKIE" "$DOMAIN/user/user" | grep 'sp3">人人钻' | awk -F'[><]' '{print $5}') | |
v_date=$(date "+%Y-%m-%d %H:%M:%S") | |
echo $v_date 人人钻:$var >> /home/zimuzu/zimuzu.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现在积分改名为人人钻了。 相应的需要脚本
38 行
BONUS=$(curl -s --cookie "$COOKIE" "$DOMAIN/user/user" | grep 'sp3">积分' | awk -F'[><]' '{print $5}')
修改为
BONUS=$(curl -s --cookie "$COOKIE" "$DOMAIN/user/user" | grep 'sp3">人人钻' | awk -F'[><]' '{print $5}')