-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse player transfer history from Tfmkt endpoint #45
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes primarily focus on fixing the issue with player transfer data not displaying correctly. The code has been updated to fetch data from a new URL, and the parsing method has been modified to extract transfer details from the new data source. The structure of the "transfers" object has also been updated to reflect these changes. Changes
Assessment against linked issues (Beta)
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- app/services/players/transfers.py (2 hunks)
- app/utils/xpath.py (1 hunks)
- tests/players/test_players_transfers.py (1 hunks)
Additional comments: 6
app/utils/xpath.py (1)
- 57-58: The XPath expression for youth clubs has been added. Ensure that this XPath correctly fetches the required data from the webpage.
tests/players/test_players_transfers.py (1)
- 23-39: The changes to the "transfers" object structure and the addition of the "upcoming" field are reflected correctly in the test. Ensure that the actual data returned by the
get_player_transfers
method matches this updated structure.app/services/players/transfers.py (4)
22-25: The new URL constant
URL_TRANSFERS
is introduced. Ensure that the URL is correct and the API endpoint is available.27-32: The
__post_init__
method is updated to make a request to the new URL. Ensure that the request is successful and the response is as expected.34-64: The method
__parse_player_transfers_history
is renamed to__parse_player_transfer_history
and its implementation is updated to parse transfer details from the new URL's response. Ensure that the parsing logic is correct and the output is as expected.72-78: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [66-78]
The
get_player_transfers
method is adjusted to use the updated parsing method. Ensure that the method returns the expected output.
Fix #44
Summary by CodeRabbit