mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-22 22:40:47 -04:00
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.
This commit is contained in:
parent
7d3155652e
commit
3513da068d
1 changed files with 12 additions and 1 deletions
|
@ -31,13 +31,16 @@ def brozzle_page(worker, page) -> bool:
|
||||||
|
|
||||||
worker = brozzler.BrozzlerWorker(None, proxy="localhost:8000")
|
worker = brozzler.BrozzlerWorker(None, proxy="localhost:8000")
|
||||||
|
|
||||||
videos = [
|
youtube_videos = [
|
||||||
# Short YouTube video
|
# Short YouTube video
|
||||||
"https://www.youtube.com/watch?v=AdtZtvlFi9o",
|
"https://www.youtube.com/watch?v=AdtZtvlFi9o",
|
||||||
# Long YouTube video (former livestream we've had trouble capturing)
|
# Long YouTube video (former livestream we've had trouble capturing)
|
||||||
"https://www.youtube.com/watch?v=v4f6InE9X_c",
|
"https://www.youtube.com/watch?v=v4f6InE9X_c",
|
||||||
# YouTube Short
|
# YouTube Short
|
||||||
"https://www.youtube.com/shorts/ee_lH4qlfzc",
|
"https://www.youtube.com/shorts/ee_lH4qlfzc",
|
||||||
|
]
|
||||||
|
|
||||||
|
videos = [
|
||||||
# Vimeo
|
# Vimeo
|
||||||
"https://vimeo.com/175568834",
|
"https://vimeo.com/175568834",
|
||||||
# Instagram
|
# Instagram
|
||||||
|
@ -57,6 +60,14 @@ videos = [
|
||||||
successes = 0
|
successes = 0
|
||||||
min_successes = math.floor(len(videos) * 0.75) or 1
|
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:
|
for url in videos:
|
||||||
page = brozzler.Page(None, {"url": url})
|
page = brozzler.Page(None, {"url": url})
|
||||||
if brozzle_page(worker, page):
|
if brozzle_page(worker, page):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue