Skip to content

Conversation

@BjoernSchotte
Copy link
Member

Summary

Automatically dismisses GDPR consent banners before page exploration, which previously blocked interaction on many European websites.

  • Adds _handle_gdpr_consent() function with multi-strategy approach
  • Supports both German and English consent button text patterns
  • Handles consent banners in main frame and iframes (Sourcepoint, Usercentrics, etc.)

How it works

  1. Click consent buttons in main frame using common selectors
  2. Scan iframes for consent CMPs (URLs containing consent, gdpr, cookie, cmp)
  3. Fall back to JavaScript DOM removal if clicking fails
  4. Press Escape as final attempt

Tested on

  • Real estate: immowelt.de, kleinanzeigen.de
  • E-commerce: ebay.de
  • Tech news: heise.de, golem.de
  • Newspapers: spiegel.de, bild.de

Test plan

  • Run scry against a German site with GDPR banner (e.g., kleinanzeigen.de)
  • Verify consent banner is dismissed automatically
  • Verify page exploration proceeds normally after dismissal

🤖 Generated with Claude Code

Automatically dismisses GDPR consent banners before page exploration,
which previously blocked interaction on many European websites.

The implementation uses a multi-strategy approach:
1. Click consent buttons in main frame using common selectors
2. Scan iframes for consent CMPs (Sourcepoint, Usercentrics, etc.)
3. Fall back to JavaScript DOM removal if clicking fails
4. Press Escape as final attempt

Supports both German and English consent button text patterns.

Tested on:
- Real estate: immowelt.de, kleinanzeigen.de
- E-commerce: ebay.de
- Tech news: heise.de, golem.de
- Newspapers: spiegel.de, bild.de

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants