Sfoglia il codice sorgente

Title case for region names.

tags/v0.1^2
Ben Kurtovic 12 anni fa
parent
commit
9bbc2b9e77
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      earwigbot/commands/geolocate.py

+ 3
- 3
earwigbot/commands/geolocate.py Vedi File

@@ -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"]


Caricamento…
Annulla
Salva