Fix search suggestions test.

This commit is contained in:
FireMasterK 2021-07-31 02:08:50 +05:30
parent a685941bba
commit fd19c53f65
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
1 changed files with 1 additions and 2 deletions

View File

@ -121,8 +121,7 @@ public class YoutubeMusicSearchExtractor extends SearchExtractor {
@Nonnull
@Override
public String getSearchSuggestion() throws ParsingException {
final JsonObject itemSectionRenderer = initialData.getObject("contents").getObject("sectionListRenderer")
.getArray("contents").getObject(0).getObject("itemSectionRenderer");
final JsonObject itemSectionRenderer = JsonUtils.getArray(JsonUtils.getArray(initialData, "contents.tabbedSearchResultsRenderer.tabs").getObject(0), "tabRenderer.content.sectionListRenderer.contents").getObject(0).getObject("itemSectionRenderer");
if (itemSectionRenderer.isEmpty()) {
return "";
}