Skip to content

Commit

Permalink
fix nettest
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Jul 18, 2023
1 parent 6fe21f9 commit 2a1a365
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/api/endpoints/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def nettest(url: str,
"""
# 记录开始的毫秒数
start_time = datetime.now()
result = RequestUtils(proxies=settings.PROXY if proxy else None).get_res(url)
result = RequestUtils(proxies=settings.PROXY if proxy else None,
ua=settings.USER_AGENT).get_res(url)
# 计时结束的毫秒数
end_time = datetime.now()
# 计算相关秒数
Expand Down

0 comments on commit 2a1a365

Please sign in to comment.