From 303c2d2ab79e6ec0687e4ab7d4b344996bcb0e90 Mon Sep 17 00:00:00 2001 From: Gregory Danielson Date: Sun, 15 Nov 2020 11:13:15 -0600 Subject: [PATCH] Observe two possible names for United States when checking us_ip --- lib/wttr_srv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wttr_srv.py b/lib/wttr_srv.py index 59a2917..0e52263 100644 --- a/lib/wttr_srv.py +++ b/lib/wttr_srv.py @@ -298,7 +298,8 @@ def parse_request(location, request, query, fast_mode=False): location, override_location_name, full_address, country, query_source_location, hemisphere = \ location_processing(parsed_query["location"], parsed_query["ip_addr"]) - us_ip = query_source_location[2] == 'United States' \ + us_ip = (query_source_location[2] == 'United States' or \ + query_source_location[2] == 'Unites States of America') \ and 'slack' not in parsed_query['user_agent'] query = parse_query.metric_or_imperial(query, lang, us_ip=us_ip)