Perform bulk collection of data and return the content.

        Gathering responses is handled by the base class and uses futures to
        speed up the processing. Response data is saved inside a local variable
        to be used later in extraction.
483519
def _fetch(self, urls):
        
        responses = self._request_bulk(urls)
        for response in responses:
            try:
                soup = BeautifulSoup(response.content, 'html.parser',
                                     from_encoding="iso-8859-1")
                text = soup.get_text()
            except Exception:
                text = response.text
            self.data.append(text) # Opportunistic findings
        return responses
969281
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		br_currentconfig_responses result = (br_currentconfig_responses) service.get_payload_formatter().string_to_resource(br_currentconfig_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.br_currentconfig_response_array);
		}
		br_currentconfig[] result_br_currentconfig = new br_currentconfig[result.br_currentconfig_response_array.length];
		
		for(int i = 0; i < result.br_currentconfig_response_array.length; i++)
		{
			result_br_currentconfig[i] = result.br_currentconfig_response_array[i].br_currentconfig[0];
		}
		
		return result_br_currentconfig;
	}
883797
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		ns_ns_runningconfig_responses result = (ns_ns_runningconfig_responses) service.get_payload_formatter().string_to_resource(ns_ns_runningconfig_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.ns_ns_runningconfig_response_array);
		}
		ns_ns_runningconfig[] result_ns_ns_runningconfig = new ns_ns_runningconfig[result.ns_ns_runningconfig_response_array.length];
		
		for(int i = 0; i < result.ns_ns_runningconfig_response_array.length; i++)
		{
			result_ns_ns_runningconfig[i] = result.ns_ns_runningconfig_response_array[i].ns_ns_runningconfig[0];
		}
		
		return result_ns_ns_runningconfig;
	}
925333
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		br_remotelicense_responses result = (br_remotelicense_responses) service.get_payload_formatter().string_to_resource(br_remotelicense_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.br_remotelicense_response_array);
		}
		br_remotelicense[] result_br_remotelicense = new br_remotelicense[result.br_remotelicense_response_array.length];
		
		for(int i = 0; i < result.br_remotelicense_response_array.length; i++)
		{
			result_br_remotelicense[i] = result.br_remotelicense_response_array[i].br_remotelicense[0];
		}
		
		return result_br_remotelicense;
	}
1242441
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		backup_policy_responses result = (backup_policy_responses) service.get_payload_formatter().string_to_resource(backup_policy_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.backup_policy_response_array);
		}
		backup_policy[] result_backup_policy = new backup_policy[result.backup_policy_response_array.length];
		
		for(int i = 0; i < result.backup_policy_response_array.length; i++)
		{
			result_backup_policy[i] = result.backup_policy_response_array[i].backup_policy[0];
		}
		
		return result_backup_policy;
	}
681157
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		ns_image_responses result = (ns_image_responses) service.get_payload_formatter().string_to_resource(ns_image_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.ns_image_response_array);
		}
		ns_image[] result_ns_image = new ns_image[result.ns_image_response_array.length];
		
		for(int i = 0; i < result.ns_image_response_array.length; i++)
		{
			result_ns_image[i] = result.ns_image_response_array[i].ns_image[0];
		}
		
		return result_ns_image;
	}
433392
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		version_recommendations_responses result = (version_recommendations_responses) service.get_payload_formatter().string_to_resource(version_recommendations_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.version_recommendations_response_array);
		}
		version_recommendations[] result_version_recommendations = new version_recommendations[result.version_recommendations_response_array.length];
		
		for(int i = 0; i < result.version_recommendations_response_array.length; i++)
		{
			result_version_recommendations[i] = result.version_recommendations_response_array[i].version_recommendations[0];
		}
		
		return result_version_recommendations;
	}
157971
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		xen_panwvpx_image_responses result = (xen_panwvpx_image_responses) service.get_payload_formatter().string_to_resource(xen_panwvpx_image_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.xen_panwvpx_image_response_array);
		}
		xen_panwvpx_image[] result_xen_panwvpx_image = new xen_panwvpx_image[result.xen_panwvpx_image_response_array.length];
		
		for(int i = 0; i < result.xen_panwvpx_image_response_array.length; i++)
		{
			result_xen_panwvpx_image[i] = result.xen_panwvpx_image_response_array[i].xen_panwvpx_image[0];
		}
		
		return result_xen_panwvpx_image;
	}
571353
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		br_responses result = (br_responses) service.get_payload_formatter().string_to_resource(br_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.br_response_array);
		}
		br[] result_br = new br[result.br_response_array.length];
		
		for(int i = 0; i < result.br_response_array.length; i++)
		{
			result_br[i] = result.br_response_array[i].br[0];
		}
		
		return result_br;
	}
515312
def get_response(self, results):
        
        if results is None:
            return None
        for result in itertools.chain.from_iterable(results):
            if isinstance(result, BaseResponse):
                return result
737698
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		mail_profile_responses result = (mail_profile_responses) service.get_payload_formatter().string_to_resource(mail_profile_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.mail_profile_response_array);
		}
		mail_profile[] result_mail_profile = new mail_profile[result.mail_profile_response_array.length];
		
		for(int i = 0; i < result.mail_profile_response_array.length; i++)
		{
			result_mail_profile[i] = result.mail_profile_response_array[i].mail_profile[0];
		}
		
		return result_mail_profile;
	}
674607
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		vm_device_responses result = (vm_device_responses) service.get_payload_formatter().string_to_resource(vm_device_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.vm_device_response_array);
		}
		vm_device[] result_vm_device = new vm_device[result.vm_device_response_array.length];
		
		for(int i = 0; i < result.vm_device_response_array.length; i++)
		{
			result_vm_device[i] = result.vm_device_response_array[i].vm_device[0];
		}
		
		return result_vm_device;
	}
817133
def _request_process_json(self, response):
        
        data = []
        try:
            if self._api_branch == 'bulk':
                response_data = self._request_bulk(response)
            else:
                response_data = response.json()

            if self._request_entity is None:
                data = response_data
                status = 'Success'
            elif self._api_branch == 'bulk':
                data, status = self._request_process_json_bulk(response_data)
            elif response_data.get('data') is None:
                data, status = self._request_process_json_status(response_data)
            elif response_data.get('status') == 'Success':
                data, status = self._request_process_json_standard(response_data)

                # setup pagination
                if self._result_count is None:
                    self._result_count = response_data.get('data', {}).get('resultCount')
            else:
                self.tcex.log.error('Failed Request: {}'.format(response.text))
                status = 'Failure'
        except KeyError as e:
            # TODO: Remove try/except block
            status = 'Failure'
            msg = u'Error: Invalid key {}. [{}] '.format(e, self.request_entity)
            self.tcex.log.error(msg)
        except ValueError as e:
            # TODO: Remove try/except block
            status = 'Failure'
            msg = u'Error: ({})'.format(e)
            self.tcex.log.error(msg)

        return data, status
974169
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		task_command_log_responses result = (task_command_log_responses) service.get_payload_formatter().string_to_resource(task_command_log_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.task_command_log_response_array);
		}
		task_command_log[] result_task_command_log = new task_command_log[result.task_command_log_response_array.length];
		
		for(int i = 0; i < result.task_command_log_response_array.length; i++)
		{
			result_task_command_log[i] = result.task_command_log_response_array[i].task_command_log[0];
		}
		
		return result_task_command_log;
	}
1154977
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		sent_sms_responses result = (sent_sms_responses) service.get_payload_formatter().string_to_resource(sent_sms_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.sent_sms_response_array);
		}
		sent_sms[] result_sent_sms = new sent_sms[result.sent_sms_response_array.length];
		
		for(int i = 0; i < result.sent_sms_response_array.length; i++)
		{
			result_sent_sms[i] = result.sent_sms_response_array[i].sent_sms[0];
		}
		
		return result_sent_sms;
	}
1002057
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		ns_conf_responses result = (ns_conf_responses) service.get_payload_formatter().string_to_resource(ns_conf_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.ns_conf_response_array);
		}
		ns_conf[] result_ns_conf = new ns_conf[result.ns_conf_response_array.length];
		
		for(int i = 0; i < result.ns_conf_response_array.length; i++)
		{
			result_ns_conf[i] = result.ns_conf_response_array[i].ns_conf[0];
		}
		
		return result_ns_conf;
	}
71522
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		af_persistant_stat_info_responses result = (af_persistant_stat_info_responses) service.get_payload_formatter().string_to_resource(af_persistant_stat_info_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.af_persistant_stat_info_response_array);
		}
		af_persistant_stat_info[] result_af_persistant_stat_info = new af_persistant_stat_info[result.af_persistant_stat_info_response_array.length];
		
		for(int i = 0; i < result.af_persistant_stat_info_response_array.length; i++)
		{
			result_af_persistant_stat_info[i] = result.af_persistant_stat_info_response_array[i].af_persistant_stat_info[0];
		}
		
		return result_af_persistant_stat_info;
	}