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

Get_search_suggestions KeyError: 'searchSuggestionRenderer' #472

Closed
nick42d opened this issue Nov 16, 2023 · 1 comment
Closed

Get_search_suggestions KeyError: 'searchSuggestionRenderer' #472

nick42d opened this issue Nov 16, 2023 · 1 comment
Labels
yt-update A server-side change caused this issue

Comments

@nick42d
Copy link
Contributor

nick42d commented Nov 16, 2023

Describe the bug
Google seems to have added history type suggestions to the search suggestions (example below from the app) at some point. These are under a different key to regular search suggestions so the current implementation will fail if history exists (example below of the JSON structure).
image
image

Proposal:
get_search_suggestions revised to:

  1. look at historySuggestionRenderer if searchSuggestionRenderers not in the list of contents.
  2. return suggestion type as well as the suggestions themselves.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a new Oauth session
  2. Run get_search_suggestions twice in a row (first time adds it to your history).
  3. KeyError: 'searchSuggestionRenderer'

Additional notes
From the screenshot, seems there is also a way to delete search history suggestions, this could be a future enhancement

@sigma67 sigma67 added the yt-update A server-side change caused this issue label Nov 20, 2023
@sigma67
Copy link
Owner

sigma67 commented Jan 6, 2024

was addressed in #495

the future enhancement to delete search suggestions is tracked in #497

@sigma67 sigma67 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
yt-update A server-side change caused this issue
Projects
None yet
Development

No branches or pull requests

2 participants