From 0a6feefa193a3f2c6ced2175480c8abe509adb4e Mon Sep 17 00:00:00 2001 From: Felipe Allegretti Date: Thu, 24 Oct 2024 08:14:17 +0200 Subject: [PATCH] fix: xpath Player Profile current club and place of birth (#77) --- app/utils/xpath.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/utils/xpath.py b/app/utils/xpath.py index 5257b34..c385a2c 100644 --- a/app/utils/xpath.py +++ b/app/utils/xpath.py @@ -24,18 +24,18 @@ class Profile: SHIRT_NUMBER = "//span[@class='data-header__shirt-number']//text()" CURRENT_CLUB_NAME = "//span[@class='data-header__club']//text()" CURRENT_CLUB_URL = "//span[@class='data-header__club']//a//@href" - CURRENT_CLUB_JOINED = "//span[text()='Joined: ']//span//text()" + CURRENT_CLUB_JOINED = "//span[contains(text(),'Joined')]//following::span[1]//text()" LAST_CLUB_NAME = "//span[contains(text(),'Last club:')]//span//a//@title" LAST_CLUB_URL = "//span[contains(text(),'Last club:')]//span//a//@href" MOST_GAMES_FOR_CLUB_NAME = "//span[contains(text(),'Most games for:')]//span//a//text()" RETIRED_SINCE_DATE = "//span[contains(text(),'Retired since:')]//span//text()" - CURRENT_CLUB_CONTRACT_EXPIRES = "//span[text()='Contract expires: ']//span//text()" + CURRENT_CLUB_CONTRACT_EXPIRES = "//span[contains(text(),'Contract expires')]//following::span[1]//text()" CURRENT_CLUB_CONTRACT_OPTION = "//span[contains(text(),'Contract option:')]//following::span[1]//text()" NAME_IN_HOME_COUNTRY = "//span[text()='Name in home country:']//following::span[1]//text()" FULL_NAME = "//span[text()='Full name:']//following::span[1]//text()" DATE_OF_BIRTH_AGE = "//span[@itemprop='birthDate']//text()" - PLACE_OF_BIRTH_CITY = "//span[text()='Place of birth:']//following::span[1]//span//text()" - PLACE_OF_BIRTH_COUNTRY = "//span[text()='Place of birth:']//following::span[1]//span//img//@title" + PLACE_OF_BIRTH_CITY = "//span[contains(text(),'Place of birth')]//following::span[1]//text()" + PLACE_OF_BIRTH_COUNTRY = "//span[contains(text(),'Place of birth')]//following::span[1]//img//@title" HEIGHT = "//span[text()='Height:']//following::span[1]//text()" CITIZENSHIP = "//span[text()='Citizenship:']//following::span[1]//text()" POSITION = "//span[text()='Position:']//following::span[1]//text()"