Selaa lähdekoodia

Title case for region names.

tags/v0.1^2
Ben Kurtovic 12 vuotta sitten
vanhempi
commit
9bbc2b9e77
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. +3
    -3
      earwigbot/commands/geolocate.py

+ 3
- 3
earwigbot/commands/geolocate.py Näytä tiedosto

@@ -59,9 +59,9 @@ class Geolocate(Command):
res = json.loads(query)

try:
country = res["countryName"]
region = res["regionName"]
city = res["cityName"]
country = res["countryName"].title()
region = res["regionName"].title()
city = res["cityName"].title()
latitude = res["latitude"]
longitude = res["longitude"]
utcoffset = res["timeZone"]


Ladataan…
Peruuta
Tallenna