From 2204925f9d463f502161394d250588b4471b18d7 Mon Sep 17 00:00:00 2001 From: lmc999 <39726914+lmc999@users.noreply.github.com> Date: Tue, 26 Nov 2024 23:15:21 +0800 Subject: [PATCH] Fix Netflix check --- check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.sh b/check.sh index c4887779..d92f6079 100644 --- a/check.sh +++ b/check.sh @@ -810,7 +810,7 @@ function MediaUnlockTest_Netflix() { fi if [ "$result1" == '200' ] || [ "$result2" == '200' ]; then local tmpresult=$(curl ${CURL_DEFAULT_OPTS} -sL 'https://www.netflix.com/' -H 'accept-language: en-US,en;q=0.9' -H "sec-ch-ua: ${UA_SEC_CH_UA}" -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "Windows"' -H 'sec-fetch-site: none' -H 'sec-fetch-mode: navigate' -H 'sec-fetch-user: ?1' -H 'sec-fetch-dest: document' --user-agent "${UA_BROWSER}") - local region=$(echo "$tmpresult" | grep -woP '"requestCountry":{"id":"\K\w\w' | head -n 1) + local region=$(echo "$tmpresult" | grep -oP '"countryName":"\K[^"]+' | head -n 1) echo -n -e "\r Netflix:\t\t\t\t${Font_Green}Yes (Region: ${region})${Font_Suffix}\n" return fi