Swimmer Module Documentation¶
- class scranking.Swimmer.Swimmer(url)¶
A class representing a swimmer for Swimcloud website
- get_event(soup)¶
Gets all the swimmer’s events with best time.
- Parameters:
soup – The BeautifulSoup you created from get_soup() method.
- Returns:
A list containing events and times.
- get_http_status()¶
Check if the Swimcloud website is working.
- Returns:
The status code of the website.
- get_info(html)¶
Get the social network informnations of the swimmer.
- Parameters:
html – A html line that contains the information.
- Returns:
A string containing the name ofhometown, university, Twitter, and Instagram.
- get_name(soup)¶
Gets the name of the swimmer.
- Parameters:
soup – The BeautifulSoup you created from get_soup() method.
- Returns:
A full name of the swimmer.
- get_soup()¶
Create a bf4 for the input url.
- Returns:
BeautifulSoup of the input url.
- lookup_event(event_name)¶
Gets event and a best time.
- Parameters:
event_name – An event you want to search for.
- Returns:
An event with a best time. If there is no such event, returns not found
- save_soup_to_file(soup, filename)¶
Create a txt file that contains the html of the input website to see with eyes.