Created
November 14, 2020 13:16
-
-
Save gmariette/e60199d44c1deb8cc8ca14683f3dc481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def getPlayersFullName(playerUrl): | |
| player_url = 'https://www.tennisexplorer.com'+ playerUrl | |
| player_response = requests.get(player_url) | |
| player_soup = BeautifulSoup(player_response.content, 'html.parser') | |
| player_table = player_soup.find("table",{"class":"plDetail"}) | |
| player_table_body = player_table.find('tbody') | |
| player_name = player_table_body.find_all('h3') | |
| return ' '.join(player_name[0].text.split()[::-1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment