From e8116a3560fc02db578d403c42f46fa7c58c5991 Mon Sep 17 00:00:00 2001 From: panqihua Date: Sun, 29 May 2022 15:10:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=AF=94=E4=BE=8B=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pixiv/pixiv.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pixiv/pixiv.sh b/pixiv/pixiv.sh index ccc19ca..450293e 100644 --- a/pixiv/pixiv.sh +++ b/pixiv/pixiv.sh @@ -321,7 +321,7 @@ do echo "download image file name=$webp_file_name,url=$webp_url" curl -v $webp_url -o $webp_file_name image_ratio=`file $webp_file_name|awk '{print $9}'|sed -e 's/,//'|sed '/^$/d'|awk '{split($0,a,"x");f=a[1]>a[2]?a[1]/a[2]:a[2]/a[1];print f}'` - if [[ -n $image_ratio && $image_ratio > $maxRatio ]] + if [[ -n $image_ratio && `echo "$image_ratio > $maxRatio"|bc` -eq 1 ]] then echo "图片分辨率`file $webp_file_name|awk '{print $9}'|sed -e 's/,//'`比率:$image_ratio>$maxRatio,视为异常,返回异常图片" watermark=`echo "画作pid:$pid"|base64` @@ -349,9 +349,11 @@ do then command="curl -v -F chat_id=$chat_id $fileList -F media='[`echo $media | cut -c 2-`]' $baseApi/sendMediaGroup" echo "上传图片命令:$command" - bash -c "$command" + result=`bash -c "$command"` + message_id=`echo $result|jq .result.message_id` + echo "message_id:$message_id" sleep $sleepImage - curl -v -d chat_id=$chat_id -d text="以上作品日榜排名分别是 #排名${start_rank}_${end_rank} #rank${start_rank}_${end_rank} ,点击作品可以查看pid/标题/画师/tag信息." $baseApi/sendMessage + curl -v -d chat_id=$chat_id -d reply_to_message_id=$message_id -d text="以上作品日榜排名分别是 #排名${start_rank}_${end_rank} #rank${start_rank}_${end_rank} ,点击作品可以查看pid/标题/画师/tag信息." $baseApi/sendMessage sleep $sleepText fileCountSize=0 fileList=''