Merge with changes (r790) in trunk.
This commit is contained in:
commit
3c35af9493
Notes:
subgit
2018-03-07 17:59:08 +01:00
r791 www/branches/life
@ -81,12 +81,22 @@ def mkGeolocationTable(file=''):
|
|||||||
response = URL.urlopen(url)
|
response = URL.urlopen(url)
|
||||||
if ( response.msg == 'OK' ):
|
if ( response.msg == 'OK' ):
|
||||||
data = JSON.loads(response.read())
|
data = JSON.loads(response.read())
|
||||||
|
city = []
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
city = data['address']['city']
|
city = data['address']['city']
|
||||||
except:
|
except:
|
||||||
warnings.warn('Using county instead of city for event {0} at {1} N / {2} E (URL: {3})'.format(publicID, lat, lng, url))
|
warnings.warn('Request {3} for event {0} at {1} N / {2} E did not provide city attribute\n\t(Response: {4})'.format(publicID, lat, lng, url, data))
|
||||||
city = data['address']['county']
|
try:
|
||||||
|
city = data['address']['town']
|
||||||
|
warnings.warn('Using attribute town ({1}) for event {0}'.format(publicID, city))
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
city = data['address']['county']
|
||||||
|
warnings.warn('Using attribute county ({1}) for event {0}'.format(publicID, city))
|
||||||
|
except:
|
||||||
|
warnings.warn('Skipping event')
|
||||||
|
continue
|
||||||
countryCode = data['address']['country_code'].upper()
|
countryCode = data['address']['country_code'].upper()
|
||||||
if ( countryCode == 'DE' ):
|
if ( countryCode == 'DE' ):
|
||||||
geolocationTable[publicID] = city.encode('utf-8')
|
geolocationTable[publicID] = city.encode('utf-8')
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
var specialEvents = [
|
var specialEvents = [
|
||||||
|
//'bug2014ytlk', // Vechta 3.0
|
||||||
|
//'bug2014wjwx', // Haltern 3.6
|
||||||
//'bug2014ldts', // Darmstadt
|
//'bug2014ldts', // Darmstadt
|
||||||
//'bug2014kowj', // Vogtland 5.0
|
//'bug2014kowj', // Vogtland 5.0
|
||||||
//'bug2014jptq', // Seeheim-Jugenheim
|
//'bug2014jptq', // Seeheim-Jugenheim
|
||||||
|
Loading…
Reference in New Issue
Block a user