The below simple example shows my problem. The link:
contains a video which autoplays. It's not an mp4 or similar video file. I think it's a stream. I am trying to prevent it from loading and playing.
CODE:
from seleniumbase import SB
with SB(uc=True, locale_code="en", headless=True, block_images=True) as sb:
link = "https://finance.yahoo.com/"
print(f"\nOpening {link}")
sb.wait_for_ready_state_complete(timeout=120)
sb.activate_cdp_mode(link)
sb.sleep(10)
sb.cdp.save_screenshot(f"screenshot.png")
print("Finished!")
Below screenshot shows the video was playing:
How can I prevent it?
