def get_surveys(self, url=_SURVEYS_URL):
    ' Function to get the surveys for the account '
    res = self.client._get(url=url, expected_status_code=200)
    soup = BeautifulSoup(res.text, _DEFAULT_BEAUTIFULSOUP_PARSER)
    surveys_soup = soup.select(_SURVEYS_SELECTOR)
    survey_list = []
    for survey_soup in surveys_soup:
        survey_name = _css_select(survey_soup, _SURVEY_NAME_SELECTOR)
        try:
            url = survey_soup.select(_SURVEY_URL_SELECTOR)[0]['href']
        except:
            raise ValueError('Cannot get URL for the survey with css selector {}'.format(_SURVEY_URL_SELECTOR))
        try:
            id = int(url.split('survey_id=')[1].split('&')[0])
        except:
            raise ValueError('Cannot extract id from URL {}'.format(url))
        survey_location = _css_select(survey_soup, _SURVEY_LOCATION_SELECTOR)
        try:
            survey_epoch = int(survey_soup.select(_SURVEY_DATE_SELECTOR)[0]['epoch'])
            survey_date_obj = datetime.fromtimestamp(survey_epoch)
            survey_date = _datetime_object_to_rfc_date_str(survey_date_obj)
        except:
            raise ValueError('Cannot get date for the survey with css selector {}'.format(_SURVEY_DATE_SELECTOR))
        survey_img_nb_and_size = survey_soup.select(_SURVEY_IMG_NB_AND_SIZE_SELECTOR)
        try:
            survey_img_nb = survey_img_nb_and_size[0].text
            survey_img_nb = int(survey_img_nb.split(' ')[0])
        except:
            raise ValueError('Cannot get or convert image number, survey_img_nb_and_size = {}'.format(survey_img_nb_and_size))
        try:
            survey_size = survey_img_nb_and_size[1].text
        except:
            raise ValueError('Cannot get survey size, survey_img_nb_and_size = {}'.format(survey_img_nb_and_size))
        sensor = _css_select(survey_soup, _SURVEY_SENSOR_SELECTOR)
        survey = Survey(id=id, name=survey_name, url=url, date=survey_date, location=survey_location, image_nb=survey_img_nb, size=survey_size, sensor=sensor)
        survey_list.append(survey)
    return survey_list
Function to get the surveys for the account
def get_surveys(self, url=_SURVEYS_URL):
    '  '
    res = self.client._get(url=url, expected_status_code=200)
    soup = BeautifulSoup(res.text, _DEFAULT_BEAUTIFULSOUP_PARSER)
    surveys_soup = soup.select(_SURVEYS_SELECTOR)
    survey_list = []
    for survey_soup in surveys_soup:
        survey_name = _css_select(survey_soup, _SURVEY_NAME_SELECTOR)
        try:
            url = survey_soup.select(_SURVEY_URL_SELECTOR)[0]['href']
        except:
            raise ValueError('Cannot get URL for the survey with css selector {}'.format(_SURVEY_URL_SELECTOR))
        try:
            id = int(url.split('survey_id=')[1].split('&')[0])
        except:
            raise ValueError('Cannot extract id from URL {}'.format(url))
        survey_location = _css_select(survey_soup, _SURVEY_LOCATION_SELECTOR)
        try:
            survey_epoch = int(survey_soup.select(_SURVEY_DATE_SELECTOR)[0]['epoch'])
            survey_date_obj = datetime.fromtimestamp(survey_epoch)
            survey_date = _datetime_object_to_rfc_date_str(survey_date_obj)
        except:
            raise ValueError('Cannot get date for the survey with css selector {}'.format(_SURVEY_DATE_SELECTOR))
        survey_img_nb_and_size = survey_soup.select(_SURVEY_IMG_NB_AND_SIZE_SELECTOR)
        try:
            survey_img_nb = survey_img_nb_and_size[0].text
            survey_img_nb = int(survey_img_nb.split(' ')[0])
        except:
            raise ValueError('Cannot get or convert image number, survey_img_nb_and_size = {}'.format(survey_img_nb_and_size))
        try:
            survey_size = survey_img_nb_and_size[1].text
        except:
            raise ValueError('Cannot get survey size, survey_img_nb_and_size = {}'.format(survey_img_nb_and_size))
        sensor = _css_select(survey_soup, _SURVEY_SENSOR_SELECTOR)
        survey = Survey(id=id, name=survey_name, url=url, date=survey_date, location=survey_location, image_nb=survey_img_nb, size=survey_size, sensor=sensor)
        survey_list.append(survey)
    return survey_list