Spaces:
Running
Running
BraydenMoore
commited on
Commit
·
6004ee0
1
Parent(s):
a38f152
Update main.py
Browse files
main.py
CHANGED
@@ -45,7 +45,7 @@ def get_location(ip):
|
|
45 |
'city': location['city']['names']['en'] if 'city' in location else '',
|
46 |
'region': location['subdivisions'][0]['names']['en'] if 'subdivisions' in location else '',
|
47 |
'loc': str(location['location']['longitude']) + ',' + str(location['location']['latitude']),
|
48 |
-
'timezone': location['location']['time_zone'] if 'time_zone' in location else ''}
|
49 |
|
50 |
def latlon_to_pixel(loc):
|
51 |
latitude = float(loc.split(',')[0])
|
|
|
45 |
'city': location['city']['names']['en'] if 'city' in location else '',
|
46 |
'region': location['subdivisions'][0]['names']['en'] if 'subdivisions' in location else '',
|
47 |
'loc': str(location['location']['longitude']) + ',' + str(location['location']['latitude']),
|
48 |
+
'timezone': location['location']['time_zone'] if 'time_zone' in location['location'] else 'America/New_York'}
|
49 |
|
50 |
def latlon_to_pixel(loc):
|
51 |
latitude = float(loc.split(',')[0])
|