(url_file)
extracts name:url pairs from the supplied file
extracts name:url pairs from the supplied file
extracts name : url pairs from the supplied file
def get_urls(url_file):
    '''
    extracts name:url pairs from the supplied file
    '''
    with open(url_file) as f:
        l = [line.strip() for line in f.readlines()]
        d = []
        for line in l:
            sp = line.split()
            if len(sp) != 2:
                raise Exception('URL file incorrectly formatted at line: {}'.format(line))
            d.append(sp)
        logging.debug('Finished extracting URLs to crawl')
        return d
def get_urls ( url_file ) : with open ( url_file ) as f : l = [ line . strip ( ) for line in f . readlines ( ) ] d = [ ] for line in l : sp = line . split ( ) if len ( sp ) != 2 : raise Exception ( 'URL file incorrectly formatted at line: {}' . format ( line ) ) d . append ( sp ) logging . debug ( 'Finished extracting URLs to crawl' ) return d