Fixed YoutubeStreamExtractorAgeRestrictedTest

Looks like a lot of stuff (description, tags, name) got changed on the existing video.
Use a better suited video.
This commit is contained in:
litetex 2021-12-08 21:08:03 +01:00
parent f735788a39
commit 3c669d3cb5
1 changed files with 17 additions and 19 deletions

View File

@ -11,6 +11,7 @@ import org.schabi.newpipe.extractor.stream.StreamExtractor;
import org.schabi.newpipe.extractor.stream.StreamType;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
@ -20,7 +21,7 @@ import static org.schabi.newpipe.extractor.ServiceList.YouTube;
public class YoutubeStreamExtractorAgeRestrictedTest extends DefaultStreamExtractorTest {
private static final String RESOURCE_PATH = DownloaderFactory.RESOURCE_PATH + "services/youtube/extractor/stream/";
private static final String ID = "MmBeUZqv1QA";
private static final String ID = "rwcfPqbAx-0";
private static final int TIMESTAMP = 196;
private static final String URL = YoutubeStreamExtractorDefaultTest.BASE_URL + ID + "&t=" + TIMESTAMP;
private static StreamExtractor extractor;
@ -37,37 +38,34 @@ public class YoutubeStreamExtractorAgeRestrictedTest extends DefaultStreamExtrac
@Override public StreamExtractor extractor() { return extractor; }
@Override public StreamingService expectedService() { return YouTube; }
@Override public String expectedName() { return "FINGERING PORNSTARS @ AVN Expo 2017 In Las Vegas!"; }
@Override public String expectedName() { return "Russian Daft Punk"; }
@Override public String expectedId() { return ID; }
@Override public String expectedUrlContains() { return YoutubeStreamExtractorDefaultTest.BASE_URL + ID; }
@Override public String expectedOriginalUrlContains() { return URL; }
@Override public StreamType expectedStreamType() { return StreamType.VIDEO_STREAM; }
@Override public String expectedUploaderName() { return "EpicFiveTV"; }
@Override public String expectedUploaderUrl() { return "https://www.youtube.com/channel/UCuPUHlLP5POZphOIrjrNxiw"; }
@Override public boolean expectedUploaderVerified() { return true; }
@Override public List<String> expectedDescriptionContains() { return Arrays.asList("http://instagram.com/Ruben_Sole", "AVN"); }
@Override public long expectedLength() { return 1790; }
@Override public String expectedUploaderName() { return "DAN TV"; }
@Override public String expectedUploaderUrl() { return "https://www.youtube.com/channel/UCcQHIVL83g5BEQe2IJFb-6w"; }
@Override public boolean expectedUploaderVerified() { return false; }
@Override public boolean expectedDescriptionIsEmpty() { return true; }
@Override public List<String> expectedDescriptionContains() { return Collections.emptyList(); }
@Override public long expectedLength() { return 10; }
@Override public long expectedTimestamp() { return TIMESTAMP; }
@Override public long expectedViewCountAtLeast() { return 28500000; }
@Nullable @Override public String expectedUploadDate() { return "2017-01-25 00:00:00.000"; }
@Nullable @Override public String expectedTextualUploadDate() { return "2017-01-25"; }
@Override public long expectedLikeCountAtLeast() { return 149000; }
@Override public long expectedDislikeCountAtLeast() { return 38000; }
@Override public long expectedViewCountAtLeast() { return 232_000; }
@Nullable @Override public String expectedUploadDate() { return "2018-03-11 00:00:00.000"; }
@Nullable @Override public String expectedTextualUploadDate() { return "2018-03-11"; }
@Override public long expectedLikeCountAtLeast() { return 3_700; }
@Override public long expectedDislikeCountAtLeast() { return 30; }
@Override public boolean expectedHasRelatedItems() { return false; } // no related videos (!)
@Override public int expectedAgeLimit() { return 18; }
@Override public boolean expectedHasSubtitles() { return false; }
@Override public boolean expectedHasFrames() { return false; }
@Override public String expectedCategory() { return "Entertainment"; }
@Override public String expectedCategory() { return "People & Blogs"; }
@Override public String expectedLicence() { return "YouTube licence"; }
@Override
public List<String> expectedTags() {
return Arrays.asList("AEE", "AEE 2017", "AVN", "AVN 2016", "AVN 2017", "AVN 2017 Expo In Las Vegas",
"AVN Awards Show", "AVN Expo", "AVN Las Vegas", "AVN Magazine", "AVN Vlog", "Ariana Marie",
"August Ames", "Brenna Sparks", "CeCe Capella", "Cindy Starfall", "Elsa Jean", "Emma Hix",
"FINGERING", "FINGERING P0RNSTARS", "FINGERING PORNSTARS", "Kaho Shibuya", "Keisha Grey",
"Kimberly Chi", "Las Vegas", "Mia Martinez", "Pornstar", "Pornstars", "Riley Reid",
"Samantha Saint", "Vegas", "Vicki Chase");
return Collections.emptyList();
}
}