-
Notifications
You must be signed in to change notification settings - Fork 215
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
KeyError: 'searchSuggestionRenderer' when using get_search_suggestions with 'a' as query #494
Comments
Cannot reproduce. Works fine for me. What does your preview look like? |
You mean what I get in the browser? Error 500. |
So you can't even type this query in your YouTube Music search bar? Seems like something's wrong on your end |
No, I can type it in YouTube Music and it's works well. |
The problem seems to occur only when authenticated. |
search suggestions is returning historySuggestionRenderer objects mixed in with the searchSuggestionRenderers when authenticated, based on past searches. replicate in test.py with def test_auth_search_suggestions(self):
# add search term to history
first_pass = self.yt_oauth.search('b')
self.assertGreater(len(first_pass), 0)
# get results
results = self.yt_oauth.get_search_suggestions('b', detailed_runs=True)
self.assertGreater(len(results), 0) Adding items to search history seems to be a bit finicky / sometimes takes a second to start getting returned by suggestions., so it may take an extra run or adding a sleep timeout to get the error. |
Describe the bug
I get an error when using the
get_search_suggestions
function with these parameters:query="a"
detailed_runs=True
Here's the error from Flask:
And this is my code:
I sent a GET request from Firefox to the flask server:
http://127.0.0.1:5000/api/get_search_suggestions?query=a&detailed_runs=true
To Reproduce
Steps to reproduce the behavior:
get_search_suggestions()
function with the following parameters:query="a"
detailed_runs=True
Additional context
At first I thought single characters may not be supported for the query, but when setting the query as
c
, I get a response:The same error also occurs for some other single characters as the query.
The error occurs when
detailed_runs
is set to bothTrue
andFalse
.The text was updated successfully, but these errors were encountered: