From 3ba34c72199371ae4958df2a086dcf60c85ae023 Mon Sep 17 00:00:00 2001 From: Felipe Allegretti Date: Thu, 24 Oct 2024 08:15:37 +0200 Subject: [PATCH 1/3] fix: xpath Player Transfers youth clubs --- app/utils/xpath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/xpath.py b/app/utils/xpath.py index c385a2c..1fc5a77 100644 --- a/app/utils/xpath.py +++ b/app/utils/xpath.py @@ -71,7 +71,7 @@ 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" From 81b910eeac9fc89db5dd2efddd716cd3c92a203d Mon Sep 17 00:00:00 2001 From: Felipe Allegretti Date: Thu, 24 Oct 2024 08:15:54 +0200 Subject: [PATCH 2/3] fix: Player Profile unit test --- tests/players/test_players_profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/players/test_players_profile.py b/tests/players/test_players_profile.py index 4077599..e2c6cc6 100644 --- a/tests/players/test_players_profile.py +++ b/tests/players/test_players_profile.py @@ -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": { From c15cadf0ab17460abd75a35e40b9737b3d9d386c Mon Sep 17 00:00:00 2001 From: Felipe Allegretti Date: Thu, 24 Oct 2024 08:20:58 +0200 Subject: [PATCH 3/3] fix: ruff --- app/utils/xpath.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/utils/xpath.py b/app/utils/xpath.py index 1fc5a77..6adde93 100644 --- a/app/utils/xpath.py +++ b/app/utils/xpath.py @@ -71,7 +71,10 @@ class MarketValue: RANKINGS_POSITIONS = "//span[contains(@class, 'quick-fact__content--large')]//text()" class Transfers: - YOUTH_CLUBS = "//div[@class='box tm-player-additional-data'][descendant::*[contains(text(), 'Youth')]]//div[@class='content']//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"