def create_big_url(name):
    """ If name looks like a url, with an http, add an entry for it in BIG_URLS """
    # BIG side effect
    global BIG_URLS
    filemeta = get_url_filemeta(name)
    if not filemeta:
        return None
    filename = filemeta['filename']
    remote_size = filemeta['remote_size']
    url = filemeta['url']
    name = filename.split('.')
    name = (name[0] if name[0] not in ('', '.') else name[1]).replace(' ', '-')
    name = name.lower().strip()
    BIG_URLS[name] = (url, int(remote_size or -1), filename)
    return name
def create_big_url ( name ) : global BIG_URLS filemeta = get_url_filemeta ( name ) if not filemeta : return None filename = filemeta [ 'filename' ] remote_size = filemeta [ 'remote_size' ] url = filemeta [ 'url' ] name = filename . split ( '.' ) name = ( name [ 0 ] if name [ 0 ] not in ( '' , '.' ) else name [ 1 ] ) . replace ( ' ' , '-' ) name = name . lower ( ) . strip ( ) BIG_URLS [ name ] = ( url , int ( remote_size or - 1 ) , filename ) return name
If name looks like a url, with an http, add an entry for it in BIG_URLS