Fix test failing because music channel could be Vevo

In yt stream extractor test.
The Vevo and the normal music channel are equivalent, so Youtube picks one of them at random, and in playerResponse the channel id is Vevo's one.
This commit is contained in:
Stypox 2020-01-06 21:41:15 +01:00
parent 1689037b01
commit d5ca02f3f6
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 5 additions and 1 deletions

View File

@ -124,7 +124,11 @@ public class YoutubeStreamExtractorDefaultTest {
@Test @Test
public void testGetUploaderUrl() throws ParsingException { public void testGetUploaderUrl() throws ParsingException {
assertEquals("https://www.youtube.com/channel/UCsRM0YB_dabtEPGPTKo-gcw", extractor.getUploaderUrl()); String url = extractor.getUploaderUrl();
if (!url.equals("https://www.youtube.com/channel/UCsRM0YB_dabtEPGPTKo-gcw") &&
!url.equals("https://www.youtube.com/channel/UComP_epzeKzvBX156r6pm1Q")) {
fail("Uploader url is neither the music channel one nor the Vevo one");
}
} }
@Test @Test