-
Is there a way to disable loading of images? I know the adblocker supports this... do I need to to configure it somehow or is there a switch to make Camoufox not load images/media at all? Edit: |
Beta Was this translation helpful? Give feedback.
Answered by
daijro
Sep 19, 2024
Replies: 1 comment
-
Hello! The most effective way to block images is through the with Camoufox(
headless=False,
firefox_user_prefs={
"permissions.default.image": 2,
}
) as browser:
page = browser.new_page()
page.goto("https://www.pexels.com/") Edit: As of v0.1.3, you can now also pass with Camoufox(
headless=False,
block_images=True
) as browser:
page = browser.new_page()
page.goto("https://www.pexels.com/") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
daijro
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
The most effective way to block images is through the
permissions.default.image
Firefox preference:https://kb.mozillazine.org/Permissions.default.image
Edit: As of v0.1.3, you can now also pass
block_images=True
: