【发布时间】:2020-11-22 17:47:25
【问题描述】:
当我在 Python 脚本中使用 youtube_dl 库下载视频时,它会在控制台中打印以下内容:
[youtube] [video]: Downloading webpage
[youtube] Downloading just video [video] because of --no-playlist
[download] Destination: [destination]
[download] 100% of 3.00MiB in 00:00
[ffmpeg] Post-process file [destination] exists, skipping
有没有办法阻止它这样做?
youtube_dl 似乎没有使用标准 Python logging 库,所以我不能这样做:
youtube_logger = logging.getLogger('youtube_dl')
youtube_logger.setLevel(logging.WARNING)
有什么方法可以防止youtube_dl 打印到控制台?
【问题讨论】:
标签: python logging youtube-dl