Skip to content

Commit

Permalink
Fix issue with exotic uas
Browse files Browse the repository at this point in the history
  • Loading branch information
funilrys committed Feb 22, 2024
1 parent 8924277 commit 207cbb8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ def generate_user_agents(self) -> Dict[str, Any]:
for device_groups in cache["data"].values():
for user_agents in device_groups.values():
for user_agent in user_agents:
if user_agent["normalized_browser"] not in normalized_data:
if (
user_agent["normalized_browser"] not in normalized_data
or user_agent["normalized_browser"]
not in normalized_data["@modern"]
):
normalized_data[user_agent["normalized_browser"]] = {}
normalized_data["@modern"][
user_agent["normalized_browser"]
Expand Down Expand Up @@ -360,9 +364,16 @@ def generate_user_agents(self) -> Dict[str, Any]:
)

if user_agent["normalized_os"] == "windows":
normalized_data[user_agent["normalized_browser"]][
normalized_data[user_agent["normalized_browser"]]["win10"] = (
normalized_data[user_agent["normalized_browser"]][
user_agent["normalized_os"]
]
)
normalized_data["@modern"][user_agent["normalized_browser"]][
"win10"
] = normalized_data[user_agent["normalized_browser"]][
] = normalized_data["@modern"][
user_agent["normalized_browser"]
][
user_agent["normalized_os"]
]

Expand Down

0 comments on commit 207cbb8

Please sign in to comment.