#!/bin/bash USERNAME="wxg4net@gmail.com" PWD="xxxxxxxxxxxxx" API_LOGIN_VALIDATE="http://www.51sjk.com/Upload/Articles/1/0/330/330080_20220921165640153.jpg" API_USER_NOTICE="http://www.51sjk.com/Upload/Articles/1/0/330/330080_20220921165640450.jpg" DATA_LOGIN=$(curl -d "username="$USERNAME"&pwd="$PWD"&keep_login=1" -c /tmp/osc.cookie $API_LOGIN_VALIDATE 2>&1) DATA_OSC_UID=$(echo "$DATA_LOGIN" | grep '<uid' | cut -f2 -d">"|cut -f1 -d"<") DATA_USER_NOTICE=$(curl -d "uid=$DATA_OSC_UID" -b /tmp/osc.cookie $API_USER_NOTICE 2>&1) atmeCount=$(echo "$DATA_USER_NOTICE" | grep '<atmeCount' | cut -f2 -d">"|cut -f1 -d"<") msgCount=$(echo "$DATA_USER_NOTICE" | grep '<msgCount' | cut -f2 -d">"|cut -f1 -d"<") reviewCount=$(echo "$DATA_USER_NOTICE" | grep '<reviewCount' | cut -f2 -d">"|cut -f1 -d"<") newFansCount=$(echo "$DATA_USER_NOTICE" | grep '<newFansCount' | cut -f2 -d">"|cut -f1 -d"<") if [ $atmeCount != "0" ] || [ $msgCount != "0" ] || [ $reviewCount != "0" ] || [ $newFansCount != "0" ] then notify-send "OSChina通知" "数据:$atmeCount / $msgCount / $reviewCount / $newFansCount" fi
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....