(self, hostname, sample, scraper_config)
return hostname
If hostname is None, look at label_to_hostname setting
If hostname is None, look at label_to_hostname setting
If hostname is None look at label_to_hostname setting
def _get_hostname(self, hostname, sample, scraper_config):
        """
        If hostname is None, look at label_to_hostname setting
        """
        if (
            hostname is None
            and scraper_config['label_to_hostname'] is not None
            and sample[self.SAMPLE_LABELS].get(scraper_config['label_to_hostname'])
        ):
            hostname = sample[self.SAMPLE_LABELS][scraper_config['label_to_hostname']]
            suffix = scraper_config['label_to_hostname_suffix']
            if suffix is not None:
                hostname += suffix

        return hostname
def _get_hostname ( self , hostname , sample , scraper_config ) : if ( hostname is None and scraper_config [ 'label_to_hostname' ] is not None and sample [ self . SAMPLE_LABELS ] . get ( scraper_config [ 'label_to_hostname' ] ) ) : hostname = sample [ self . SAMPLE_LABELS ] [ scraper_config [ 'label_to_hostname' ] ] suffix = scraper_config [ 'label_to_hostname_suffix' ] if suffix is not None : hostname += suffix return hostname