字幕组网站每天签到获得 1 积分,可用 100 积分升级金至尊会员。三个月未登录网站或者客户端的“金至尊会员”也会被降级到至尊会员。
源码:zimuzu-sign.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| #!/bin/bash
ACCOUNT="user" PASSWORD="password" LOG=/var/log/zimuzu-sign.log
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.zimuzu.tv" 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" > /dev/null echo '签到......'
sleep 1
BONUS=$(curl -s --cookie "$COOKIE" "$DOMAIN/user/user" | grep 'sp3">积分' | awk -F'[><]' '{print $5}') DATE=$(date "+%Y-%m-%d %H:%M:%S") echo $DATE 积分:$BONUS >> &LOG
|