Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
Fix Extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
HaarigerHarald committed Jan 18, 2020
1 parent 53a52aa commit 2b0d529
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 176 deletions.
Expand Up @@ -33,30 +33,29 @@ public class ExtractorTestCases {
@Test
public void testUsualVideo() throws Throwable {
VideoMeta expMeta = new VideoMeta("YE7VzlLtp-4", "Big Buck Bunny", "Blender",
"UCSMOQeBJ2RAnuFungnQOxLg", 597, 0, false);
"UCSMOQeBJ2RAnuFungnQOxLg", 597, 0, false, "");
extractorTest("http://youtube.com/watch?v=YE7VzlLtp-4", expMeta);
extractorTestDashManifest("http://youtube.com/watch?v=YE7VzlLtp-4");
}

@Test
public void testUnembeddable() throws Throwable {
VideoMeta expMeta = new VideoMeta("QH4VHl2uQ9o", "Match Chain Reaction Amazing Fire Art - real ghost rider", "BLACKHAND",
"UCl9nsRuGenStMDZfD95w85A", 331, 0, false);
"UCl9nsRuGenStMDZfD95w85A", 331, 0, false, "");
extractorTest("https://www.youtube.com/watch?v=QH4VHl2uQ9o", expMeta);
extractorTestDashManifest("https://www.youtube.com/watch?v=QH4VHl2uQ9o");
}

@Test
public void testEncipheredVideo() throws Throwable {
VideoMeta expMeta = new VideoMeta("e8X3ACToii0", "Rise Against - Savior (Official Video)", "RiseAgainstVEVO",
"UChMKB2AHNpeuWhalpRYhUaw", 243, 0, false);
"UChMKB2AHNpeuWhalpRYhUaw", 243, 0, false, "");
extractorTest("https://www.youtube.com/watch?v=e8X3ACToii0", expMeta);
}

@Test
public void testAgeRestrictVideo() throws Throwable {
VideoMeta expMeta = new VideoMeta("61Ev-YvBw2c", "Test video for age-restriction",
"jpdemoA", "UC95NqtFsDZKlmzOJmZi_g6Q", 14, 0, false);
"jpdemoA", "UC95NqtFsDZKlmzOJmZi_g6Q", 14, 0, false, "");
extractorTest("http://www.youtube.com/watch?v=61Ev-YvBw2c", expMeta);
// extractorTestDashManifest("http://www.youtube.com/watch?v=61Ev-YvBw2c");
}
Expand Down
Expand Up @@ -6,6 +6,7 @@ public class VideoMeta {

private String videoId;
private String title;
private String shortDescript;

private String author;
private String channelId;
Expand All @@ -15,17 +16,18 @@ public class VideoMeta {

private boolean isLiveStream;

protected VideoMeta(String videoId, String title, String author, String channelId, long videoLength, long viewCount, boolean isLiveStream) {
protected VideoMeta(String videoId, String title, String author, String channelId,
long videoLength, long viewCount, boolean isLiveStream, String shortDescript) {
this.videoId = videoId;
this.title = title;
this.author = author;
this.channelId = channelId;
this.videoLength = videoLength;
this.viewCount = viewCount;
this.isLiveStream = isLiveStream;
this.shortDescript = shortDescript;
}


// 120 x 90
public String getThumbUrl() {
return IMAGE_BASE_URL + videoId + "/default.jpg";
Expand Down Expand Up @@ -82,6 +84,10 @@ public long getViewCount() {
return viewCount;
}

public String getShortDescription() {
return shortDescript;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down

0 comments on commit 2b0d529

Please sign in to comment.