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

Accept cookies for Google before searching #3

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

imjoseangel
Copy link
Contributor

@imjoseangel imjoseangel commented Jan 4, 2025

When running a command like this:

fake_traffic -nh -c us -k "example"

It hangs on the screen:

Cookies

The await page.click("#L2AGLb") accepts the button and continue the process.

@deedy5 Could you please review? Thanks

@deedy5
Copy link
Owner

deedy5 commented Jan 5, 2025

  1. Are you sure it ("#L2AGLb") will always detect the button? Why not use the "Accept all text"?
  2. What happens if this page ("Before you continue to Google") doesn't show up? (and it doesn't come up very often).

@imjoseangel
Copy link
Contributor Author

Thanks for your comment,

  • For point 1, the id #L2AGLb is always the same but not the "Accept All" Text see code below in Dutch:
<button id="L2AGLb" class="tHlp8d" data-ved="0ahUKEwiesvPWlt6KAxXgVKQEHbkjCYwQiZAHCIUB">
    <div class="QS5gu sy4vM" role="none">Alles accepteren</div>
</button>
  • For point 2, I have experienced the cookies screen 100% of the times. (MacOs with clean installation).

BTW, I added a conditional to check both scenarios (if button exists, accept and continue).

@deedy5 deedy5 merged commit 0a7fb69 into deedy5:main Jan 18, 2025
2 checks passed
@deedy5
Copy link
Owner

deedy5 commented Jan 18, 2025

Thanks @imjoseangel

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