[Bugfix] 修改获取城市

pull/1147/head
ibuler 2018-03-28 16:47:36 +08:00
parent 2e8f5919a8
commit e1cab35db0
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ def get_ip_city(ip, timeout=10):
url = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=%s&format=json' % ip
try:
r = requests.get(url, timeout=timeout)
except requests.Timeout:
except:
r = None
city = 'Unknown'
if r and r.status_code == 200: