修复无法检测地区的BUG
This commit is contained in:
@@ -28,7 +28,8 @@ is_cn=false
|
|||||||
|
|
||||||
echo "Detecting geographic location..."
|
echo "Detecting geographic location..."
|
||||||
|
|
||||||
COUNTRY=$(curl -s --max-time 3 https://ipinfo.io/country || true)
|
COUNTRY=$(curl -s --max-time 5 https://ipinfo.littlediary.cn/info | grep -o '"country":"[^"]*"' | cut -d'"' -f4)
|
||||||
|
|
||||||
if [ "$COUNTRY" = "CN" ]; then
|
if [ "$COUNTRY" = "CN" ]; then
|
||||||
is_cn=true
|
is_cn=true
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user