From 3513da068dcec507edbfddde5f9ceb8c26733cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Wed, 28 May 2025 13:03:00 -0700 Subject: [PATCH] tests: separate out youtube tests Right now we expect these YouTube tests to fail for reasons unrelated to yt-dlp. We still want to try them, but we won't count them towards capture failures. --- scripts/ytdlp_test.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/ytdlp_test.py b/scripts/ytdlp_test.py index 71e4500..1b15545 100644 --- a/scripts/ytdlp_test.py +++ b/scripts/ytdlp_test.py @@ -31,13 +31,16 @@ def brozzle_page(worker, page) -> bool: worker = brozzler.BrozzlerWorker(None, proxy="localhost:8000") -videos = [ +youtube_videos = [ # Short YouTube video "https://www.youtube.com/watch?v=AdtZtvlFi9o", # Long YouTube video (former livestream we've had trouble capturing) "https://www.youtube.com/watch?v=v4f6InE9X_c", # YouTube Short "https://www.youtube.com/shorts/ee_lH4qlfzc", +] + +videos = [ # Vimeo "https://vimeo.com/175568834", # Instagram @@ -57,6 +60,14 @@ videos = [ successes = 0 min_successes = math.floor(len(videos) * 0.75) or 1 +# We expect YouTube videos to fail, so we separate these out and +# don't count these towards failures. It's still useful to perform +# the setup and attempt so we get insight into whether other things +# may have messed up. +for url in youtube_videos: + page = brozzler.Page(None, {"url": url}) + brozzle_page(worker, page) + for url in videos: page = brozzler.Page(None, {"url": url}) if brozzle_page(worker, page):