Skip to main content

Curated CSS selectors to hide cookie banners, chat widgets, and accessibility overlays before web capture

Project description

hide-overlays

Curated CSS selectors that hide cookie consent banners, live chat widgets, and accessibility overlays before web capture.

Works with any browser automation tool — Playwright, Selenium, Puppeteer.

Install

pip install hide-overlays

Usage

Playwright

from overlay_css import get_css

page.add_style_tag(content=get_css())

Selenium

from overlay_css import get_css

css = get_css()
driver.execute_script(
    f"const s=document.createElement('style');s.innerHTML=`{css}`;document.head.appendChild(s);"
)

Filter to specific groups

from overlay_css import get_css, get_selectors

# Only hide cookie banners
page.add_style_tag(content=get_css(groups=["cookies"]))

# Inspect the raw selectors
print(get_selectors(groups=["chat", "accessibility"]))

Selector groups

Group Covers
cookies OneTrust, Cookiebot, Termly, cc-window, dealer-specific banners
chat Drift, Intercom, Zopim, HubSpot, generic chat widget patterns
accessibility accessiBe, UserWay, AudioEye, ADA widget buttons

Adding selectors

The selectors live in overlay_css/selectors.yaml. Open a pull request to add new ones.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hide_overlays-1.0.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hide_overlays-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file hide_overlays-1.0.0.tar.gz.

File metadata

  • Download URL: hide_overlays-1.0.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hide_overlays-1.0.0.tar.gz
Algorithm Hash digest
SHA256 21453febb6bee3fe0d7f92a49020b7adebca20d8e9e86c15680f6415d450851d
MD5 b61005c895fdd40b7107bedd3fd3eea2
BLAKE2b-256 e7a405065ec23a228acd0cbb8f6ac75cf46e234e9f9810f204d66023fa989f84

See more details on using hashes here.

File details

Details for the file hide_overlays-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: hide_overlays-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hide_overlays-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e56b3e85319af48382c37789a8d4533f7d99a1825772a878b487313538266782
MD5 808aaf6052025bd33badc9a705309970
BLAKE2b-256 9ff92f1c6ef7c0a1425ed52deeabd3fc065d482dfdca3da93206c9d5c1d1e352

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page