Exemple #1
0
def _get_current_day_tag(tag):
    current_day = utils.get_weekday_number(datetime.today())

    start_slice = current_day * 9 + 1  # first tr is name of day
    stop_slice = start_slice + 8  # 8 meals in total, so we need process 7 more

    return tag.find_all('table')[2].find('tbody').find_all('tr')[start_slice:stop_slice]
Exemple #2
0
def _get_current_day_tag(tag):
    current_day = utils.get_weekday_number(datetime.today())

    meal_section = tag.find_all(_get_meals_section)[0]
    meal_div = meal_section.find_all(_get_meals_div)[0]
    meals_start_tag = meal_div.find_all(_get_meals_start_address_tag)

    return meals_start_tag[current_day]
Exemple #3
0
def _get_current_day_tag(tag):
    current_day = utils.get_weekday_number(datetime.today())
    return tag.table.find_all('tbody')[current_day]
Exemple #4
0
def _get_current_day_tag(tag):
    current_day = utils.get_weekday_number(datetime.today())
    return tag.find_all(_lunches_tag)[current_day].parent