mirror of
https://github.com/vernette/ipregion.git
synced 2026-07-09 15:58:32 +00:00
refactor(ipregion): simplify gemini support lookup
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
This commit is contained in:
parent
8b9342c2ac
commit
89a75849ab
1 changed files with 2 additions and 6 deletions
|
|
@ -1717,14 +1717,10 @@ lookup_google() {
|
|||
|
||||
lookup_gemini_supported() {
|
||||
local ip_version="$1"
|
||||
local response country_code country_name available color_name
|
||||
local country_code country_name available color_name
|
||||
local gemini_regions_url="https://ai.google.dev/gemini-api/docs/available-regions.md.txt"
|
||||
|
||||
response=$(curl_wrapper GET "https://www.google.com" \
|
||||
--user-agent "$USER_AGENT" \
|
||||
--ip-version "$ip_version")
|
||||
|
||||
country_code=$(grep_wrapper --perl '"MgUcDb":"\K[^"]*' <<<"$response")
|
||||
country_code=$(lookup_google "$ip_version")
|
||||
|
||||
if [[ -z "$country_code" ]]; then
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue