app/database/db_functions.py
def update_fighter(self, url):
        """Update fighter by passing his url."""

        # grab all necessary informations
        run_driver(url, headless=1)
        fighter_stat_list, fighter_career_history = grab_fighter_info()
        table_name = fighter_stat_list[0].replace(' ', '_', 1).split()[0]

        # update fighter's stats
        self.update_fighter_row(
            fighter_stat_list=fighter_stat_list)

        # remove rows (fights) from fighter's career history table
        self.career_history_remove_fights(table_name=table_name)

        # add rows (fights) to fighter's career history table
        self.career_history_add_fights(
            table_name=table_name, fighter_career_history=fighter_career_history)
Update fighter by passing his url.
Update fighter by passing his url.
Update fighter by passing his url .
def update_fighter(self, url):
        run_driver(url, headless=1)
        fighter_stat_list, fighter_career_history = grab_fighter_info()
        table_name = fighter_stat_list[0].replace(' ', '_', 1).split()[0]
        self.update_fighter_row(
            fighter_stat_list=fighter_stat_list)
        self.career_history_remove_fights(table_name=table_name)
        self.career_history_add_fights(
            table_name=table_name, fighter_career_history=fighter_career_history)
def update_fighter ( self , url ) : run_driver ( url , headless = 1 ) fighter_stat_list , fighter_career_history = grab_fighter_info ( ) table_name = fighter_stat_list [ 0 ] . replace ( ' ' , '_' , 1 ) . split ( ) [ 0 ] self . update_fighter_row ( fighter_stat_list = fighter_stat_list ) self . career_history_remove_fights ( table_name = table_name ) self . career_history_add_fights ( table_name = table_name , fighter_career_history = fighter_career_history )
Update fighter by passing his url.
Update fighter by passing his url .
"""Update fighter by passing his url.""" # grab all necessary informations # update fighter's stats # remove rows (fights) from fighter's career history table # add rows (fights) to fighter's career history table
self
url