try:
www = urllib.request.urlopen(url, timeout=3)
temp = www.read().decode('utf-8')
temp = float(temp)
if convert_to_fahrenheit:
try:
www = urllib.request.urlopen(url, timeout=3)
temp = www.read().decode('utf-8')
temp = float(temp)
if convert_to_fahrenheit: