Eralien commited on
Commit
42d8138
·
unverified ·
1 Parent(s): 647c87c

feat: show initial geoip with given proxy settings (#500)

Browse files
Files changed (1) hide show
  1. modules/utils.py +2 -1
modules/utils.py CHANGED
@@ -375,7 +375,8 @@ def replace_today(prompt):
375
 
376
  def get_geoip():
377
  try:
378
- response = requests.get("https://ipapi.co/json/", timeout=5)
 
379
  data = response.json()
380
  except:
381
  data = {"error": True, "reason": "连接ipapi失败"}
 
375
 
376
  def get_geoip():
377
  try:
378
+ with retrieve_proxy():
379
+ response = requests.get("https://ipapi.co/json/", timeout=5)
380
  data = response.json()
381
  except:
382
  data = {"error": True, "reason": "连接ipapi失败"}