mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 20:51:25 +03:00
Заменил код вызывающий ошибку
This commit is contained in:
parent
bcdf26416a
commit
825d667c25
1 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@ import httpx
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from user_agents import parse as ua_parse
|
from user_agents import parse as ua_parse
|
||||||
from http import HTTPStatus
|
|
||||||
|
|
||||||
config = yaml.safe_load(open('../config.yaml'))
|
config = yaml.safe_load(open('../config.yaml'))
|
||||||
|
|
||||||
|
@ -13,7 +12,7 @@ class PlausibleAnalytics:
|
||||||
user_agent = request.headers.get('user-agent', 'unknown')
|
user_agent = request.headers.get('user-agent', 'unknown')
|
||||||
user_agent_parsed = ua_parse(user_agent)
|
user_agent_parsed = ua_parse(user_agent)
|
||||||
|
|
||||||
if HTTPStatus(response.status_code).is_client_error:
|
if 400 <= response.status_code < 500:
|
||||||
return
|
return
|
||||||
|
|
||||||
event = {
|
event = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue