Skip to content

Commit

Permalink
Fix/xpath player transfers youth clubs (#78)
Browse files Browse the repository at this point in the history
* fix: xpath Player Transfers youth clubs

* fix: Player Profile unit test

* fix: ruff
  • Loading branch information
felipeall authored Oct 24, 2024
1 parent 0a6feef commit cc72645
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/utils/xpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ class MarketValue:
RANKINGS_POSITIONS = "//span[contains(@class, 'quick-fact__content--large')]//text()"

class Transfers:
YOUTH_CLUBS = "//div[@data-viewport='Jugendvereine']//div//text()"
YOUTH_CLUBS = (
"//div[@class='box tm-player-additional-data'][descendant::*[contains(text(), 'Youth')]]"
"//div[@class='content']//text()"
)

class Stats:
ROWS = "//table[@class='items']//tbody//tr"
Expand Down
2 changes: 1 addition & 1 deletion tests/players/test_players_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_get_player_profile_8198(len_greater_than_0):
"url": And(str, len_greater_than_0),
"name": And(str, len_greater_than_0),
"description": And(str, len_greater_than_0),
"nameInHomeCountry": And(str, len_greater_than_0),
"fullName": And(str, len_greater_than_0),
"imageURL": And(str, len_greater_than_0),
"dateOfBirth": And(str, len_greater_than_0),
"placeOfBirth": {
Expand Down

0 comments on commit cc72645

Please sign in to comment.