def main(args):
    """
        Main function.
    """
    urls = []
    
    # Grabbing all possible URL
    with open(args.file) as iF:
        urls = iF.read().splitlines()

    # Creating the output folder if it does not exist.
    if not os.path.exists(args.output_folder):
        os.makedirs(args.output_folder)

    # Using threads in a pool if we are not running the program in main
    zeronets = []

    for i, url in enumerate(urls):
        zeronets.append((url, i+1, len(urls), args.output_folder, args.overwrite))     

    # If the process is executed by the current app, we use the Processes. It is faster than pools.
    if args.threads <= 0 or args.threads > len(zeronets):
        nThreads = len(zeronets)
    else:
        nThreads = args.threads
        
    # Launching the Pool
    # ------------------
    #logger.info("Launching " + str(nThreads) + " different threads...")
    # We define the pool
    pool = Pool(nThreads)

    # We call the wrapping function with all the args previously generated
    poolResults = pool.map(multi_run_wrapper,zeronets)

    pool.close()
Main function.