Format the YoutubeMusicSearchExtractor class to be in the 100 characters per line limit

This commit is contained in:
TiA4f8R 2021-06-05 18:19:10 +02:00
parent 34a9ccb0fd
commit e97a685989
No known key found for this signature in database
GPG key ID: E6D3E7F5949450DD

View file

@ -38,7 +38,8 @@ public class YoutubeMusicSearchExtractor extends SearchExtractor {
}
@Override
public void onFetchPage(@Nonnull final Downloader downloader) throws IOException, ExtractionException {
public void onFetchPage(@Nonnull final Downloader downloader) throws IOException,
ExtractionException {
final String[] youtubeMusicKeys = YoutubeParsingHelper.getYoutubeMusicKeys();
final String url = "https://music.youtube.com/youtubei/v1/search?alt=json&key=" + youtubeMusicKeys[0];
@ -183,7 +184,8 @@ public class YoutubeMusicSearchExtractor extends SearchExtractor {
}
@Override
public InfoItemsPage<InfoItem> getPage(final Page page) throws IOException, ExtractionException {
public InfoItemsPage<InfoItem> getPage(final Page page) throws IOException,
ExtractionException {
if (page == null || isNullOrEmpty(page.getUrl())) {
throw new IllegalArgumentException("Page doesn't contain an URL");
}
@ -322,7 +324,8 @@ public class YoutubeMusicSearchExtractor extends SearchExtractor {
.getObject(1).getObject("musicResponsiveListItemFlexColumnRenderer")
.getObject("text").getArray("runs").getObject(0);
if (!navigationEndpointHolder.has("navigationEndpoint")) return null;
if (!navigationEndpointHolder.has("navigationEndpoint"))
return null;
final String url = getUrlFromNavigationEndpoint(navigationEndpointHolder.getObject("navigationEndpoint"));
@ -525,7 +528,8 @@ public class YoutubeMusicSearchExtractor extends SearchExtractor {
}
}
private Page getNextPageFrom(final JsonArray continuations) throws ParsingException, IOException, ReCaptchaException {
private Page getNextPageFrom(final JsonArray continuations) throws ParsingException,
IOException, ReCaptchaException {
if (isNullOrEmpty(continuations)) {
return null;
}