Example #1
0
def list_missions(mission_type, countries_list):
    result = []
    countries_list = countries_list
    for country_id in countries_list:
        page = post_request(GENERIC_MISSION_PAGE.format(mission_type=mission_type), {u'id_pays': country_id})
        countries_missions = parse_all_missions_in_page(page, country_id)
        result += countries_missions
    return result
Example #2
0
def list_countries():
    ''' returns the list of countries available for each mission_type '''
    result = {}
    mission_types = ["4", "5"]
    for i in mission_types:
        html_page = get_request(GENERIC_MISSION_PAGE.format(mission_type=i))
        result[i] = get_country_list(html_page)
    return result