Skip to content

Commit

Permalink
fix: using entire btag with encoded number sign for players search (#224
Browse files Browse the repository at this point in the history
)
  • Loading branch information
TeKrop authored Jan 1, 2025
1 parent f21bbf0 commit 6871d2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/players/parsers/search_data_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def parse_data(self) -> dict:
return {self.data_type: data_value}

def get_blizzard_url(self, **kwargs) -> str:
player_name = kwargs.get("player_id").split("-")[0]
# Replace dash by encoded number sign (#) for search
player_name = kwargs.get("player_id").replace("-", "%23")
return f"{super().get_blizzard_url(**kwargs)}/{player_name}/"

def retrieve_data_value(self, player_data: dict) -> str | None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "overfast-api"
version = "3.8.1"
version = "3.8.2"
description = "Overwatch API giving data about heroes, maps, and players statistics."
license = {file = "LICENSE"}
authors = [
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6871d2d

Please sign in to comment.