def parse_all_missions(): db_remove_all_missions() result = list_countries() expiry_date = get_expiry_date() staff_page = get_request(STAFF_PAGE) airport_page = get_request(AIRPORT_PAGE) current_airport = build_airport(airport_page, staff_page) country = current_airport.country for mission_type, countries_list in result.iteritems(): mission_list = list_missions(mission_type, countries_list) for a_mission_dict in mission_list: a_mission = enrich_mission_dictionary(a_mission_dict, expiry_date, country, mission_type) if is_possible_mission(a_mission) and is_interesting_mission(a_mission): db_insert_object(a_mission)