Downloader.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:HLTVDemoDownloader 作者: ReagentX 项目源码 文件源码
def convert_to_demo_ids(match_ids, threads):
    # Tell the user what is happening
    print "Converting Match IDs to Demo IDs"

    # Define the number of threads
    pool = ThreadPool(threads)

    # Calls get_demo_ids() and adds the value returned each call to an array called demo_ids
    demo_ids = pool.map(get_demo_ids, match_ids)
    pool.close()
    pool.join()

    # Create an array to add any captured errors to
    errors = []

    # Find any errors, add them to the errors array, and remove them from demo_ids
    for text in demo_ids:
        if " " in text:
            errors.append(text[1:])
            demo_ids.remove(text)

    # Print the errors (if there are any)
    print_errors(errors)
    return demo_ids
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号