Skip to content

Commit d8ccc7c

Browse files
committed
Update livestream mocks and add instructions how to run YoutubeStreamLiveExtractor test with the recording downloader successfully
1 parent 5a7bf67 commit d8ccc7c

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/downloader/RecordingDownloader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ public Response execute(@Nonnull final Request request) throws IOException,
7676
response.responseCode(),
7777
response.responseMessage(),
7878
response.responseHeaders(),
79+
// Uncomment this when running with the RecordingDownloader YoutubeLiveStreamExtractorTest
80+
// response.responseBody(),
7981
cleanedResponseBody,
8082
response.latestUrl()
8183
);

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/stream/YoutubeStreamExtractorLivestreamTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public class YoutubeStreamExtractorLivestreamTest extends DefaultStreamExtractor
2626
private static final String URL = YoutubeStreamExtractorDefaultTest.BASE_URL + ID + "&t=" + TIMESTAMP;
2727
private static StreamExtractor extractor;
2828

29+
// When you run this test with the RecordingDownloader, please uncomment line 80 and comment
30+
// line 81. Otherwise, the test will fail because parsing the DASH manifest requires your IP
31+
// address. You will have to remove it manually in the mocks.
2932
@BeforeClass
3033
public static void setUp() throws Exception {
3134
YoutubeParsingHelper.resetClientVersionAndKey();

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/stream/live/generated_mock_0.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/stream/live/generated_mock_1.json

Lines changed: 4 additions & 5 deletions
Large diffs are not rendered by default.

extractor/src/test/resources/org/schabi/newpipe/extractor/services/youtube/extractor/stream/live/generated_mock_2.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)