Format the YoutubeMusicSearchExtractor class to be in the 100 characters per line limit
This commit is contained in:
parent
34a9ccb0fd
commit
e97a685989
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue