From b693b8713f7912e6165065bb5dcbe04c5e6d1885 Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Sun, 3 Apr 2022 17:50:27 -0700 Subject: [PATCH] skip live streams --- brozzler/ydl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/brozzler/ydl.py b/brozzler/ydl.py index 166172f..ee355b5 100644 --- a/brozzler/ydl.py +++ b/brozzler/ydl.py @@ -18,6 +18,7 @@ limitations under the License. import logging import yt_dlp as youtube_dl +from yt_dlp.utils import match_filter_func import brozzler import urllib.request import tempfile @@ -249,6 +250,8 @@ def _build_youtube_dl(worker, destdir, site): # "ext: Equivalent to vext,aext" "format_sort": ["ext"], "format": "b/bv+ba", + # skip live streams + "match_filter": match_filter_func("!is_live"), # --cache-dir local or... "cache_dir": False,