Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(agent/web): Add browser extensions to deal with cookie walls and ads #6778

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Feb 1, 2024

Background

While browsing, the agent may try to access websites that have cookie walls, banners, or other popups, bloating or obstructing access to the page content. This impedes the agent's ability to retrieve information from these websites.

Luckily, there are browser extensions to deal with UX pollution. These can be sideloaded through Selenium and solve the problem for us.

Changes 🏗️

  • Add _sideload_chrome_extensions subroutine to open_page_in_browser in web_selenium.py
    • Sideloads uBlock Origin and I Still Don't Care About Cookies, downloading them if necessary
  • Add 2-second delay to open_page_in_browser to allow time for handling cookie walls

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

… ads

* Add `_sideload_chrome_extensions` subroutine to `open_page_in_browser` in web_selenium.py
   * Sideloads uBlock Origin and I Still Don't Care About Cookies, downloading them if necessary
* Add 2-second delay to `open_page_in_browser` to allow time for handling cookie walls
@Pwuts Pwuts marked this pull request as draft February 1, 2024 14:30
@github-actions github-actions bot added the size/m label Feb 1, 2024
@Pwuts Pwuts self-assigned this Feb 1, 2024
Copy link

netlify bot commented Feb 1, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit 6565140
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/65bd2567c4c8ca0008b70a19
😎 Deploy Preview https://deploy-preview-6778--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Pwuts Pwuts marked this pull request as ready for review February 2, 2024 16:08
@Pwuts Pwuts merged commit fe0923b into master Feb 2, 2024
13 of 16 checks passed
@Pwuts Pwuts deleted the agent/browsing-handle-cookie-walls branch February 2, 2024 17:30
KidiIT

This comment was marked as spam.

@KidiIT

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants