Skip to content

Commit ec838d7

Browse files
committed
[YouTube] Add missing prettyPrint query parameter to some test InnerTube requests
This query parameter for which its value is set to false was not added to two requests made in test classes of YoutubeMixPlaylistExtractorTest. Also remove an unneeded ParsingException exception throwing declaration in a test method.
1 parent 2c94179 commit ec838d7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.schabi.newpipe.extractor.Page;
2323
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
2424
import org.schabi.newpipe.extractor.exceptions.ParsingException;
25-
import org.schabi.newpipe.extractor.playlist.PlaylistExtractor;
2625
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
2726
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMixPlaylistExtractor;
2827
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
@@ -454,7 +453,8 @@ void getPage() throws Exception {
454453
.getBytes(StandardCharsets.UTF_8);
455454

456455
final InfoItemsPage<StreamInfoItem> streams = extractor.getPage(new Page(
457-
YOUTUBEI_V1_URL + "next?key=" + getKey(), null, null, dummyCookie, body));
456+
YOUTUBEI_V1_URL + "next?key=" + getKey() + DISABLE_PRETTY_PRINT_PARAMETER,
457+
null, null, dummyCookie, body));
458458
assertFalse(streams.getItems().isEmpty());
459459
assertTrue(streams.hasNextPage());
460460
}
@@ -542,7 +542,8 @@ void getPage() throws Exception {
542542
.getBytes(StandardCharsets.UTF_8);
543543

544544
final InfoItemsPage<StreamInfoItem> streams = extractor.getPage(new Page(
545-
YOUTUBEI_V1_URL + "next?key=" + getKey(), null, null, dummyCookie, body));
545+
YOUTUBEI_V1_URL + "next?key=" + getKey() + DISABLE_PRETTY_PRINT_PARAMETER,
546+
null, null, dummyCookie, body));
546547
assertFalse(streams.getItems().isEmpty());
547548
assertTrue(streams.hasNextPage());
548549
}
@@ -570,7 +571,7 @@ void getContinuations() throws Exception {
570571
}
571572

572573
@Test
573-
void getStreamCount() throws ParsingException {
574+
void getStreamCount() {
574575
assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount());
575576
}
576577

0 commit comments

Comments
 (0)