By the way, you can use the find method on an Element.
root = ET.fromstring(r.content) TZ = resp.find('TimeZone').textAnother trick to make from a flat xml structure a dict:
result = {e.tag: e.text for e in resp}
Output:{'Ip': 'xxx.xxx.xxx.xxx',
'Status': 'OK',
'CountryCode': 'DE',
'CountryCode3': 'DEU',
'CountryName': 'Germany',
'RegionCode': '07',
'RegionName': 'Nordrhein-Westfalen',
'City': 'Iserlohn',
'ZipPostalCode': '58636',
'Latitude': '51.3800',
'Longitude': '7.7032',
'AreaCode': '0',
'TimeZone': 'Europe/Berlin'}
You should not run your script to often. Otherwise -> RateLimit
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!