Inherit from DefaultListExtractorTest in channel tab tests
This commit is contained in:
parent
276c293889
commit
ee625c325c
|
@ -3,22 +3,27 @@ package org.schabi.newpipe.extractor.services.bandcamp;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
||||||
|
import org.schabi.newpipe.extractor.InfoItem;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||||
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
||||||
|
import org.schabi.newpipe.extractor.services.DefaultListExtractorTest;
|
||||||
import org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampChannelTabExtractor;
|
import org.schabi.newpipe.extractor.services.bandcamp.extractors.BandcampChannelTabExtractor;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.Bandcamp;
|
import static org.schabi.newpipe.extractor.ServiceList.Bandcamp;
|
||||||
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestRelatedItems;
|
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestRelatedItems;
|
||||||
|
|
||||||
class BandcampChannelTabExtractorTest {
|
class BandcampChannelTabExtractorTest {
|
||||||
|
|
||||||
static class Tracks implements BaseListExtractorTest {
|
static class Tracks extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static BandcampChannelTabExtractor extractor;
|
private static BandcampChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -29,50 +34,17 @@ class BandcampChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return Bandcamp; }
|
||||||
public void testServiceId() throws Exception {
|
@Override public String expectedName() throws Exception { return ChannelTabs.TRACKS; }
|
||||||
assertEquals(Bandcamp.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "2464198920"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://wintergatan.bandcamp.com/track"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://wintergatan.bandcamp.com/track"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Albums extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.TRACKS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("2464198920", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://wintergatan.bandcamp.com/track", extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://wintergatan.bandcamp.com/track", extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
// Bandcamp only return a single page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Albums implements BaseListExtractorTest {
|
|
||||||
private static BandcampChannelTabExtractor extractor;
|
private static BandcampChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -83,46 +55,13 @@ class BandcampChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return Bandcamp; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.ALBUMS; }
|
||||||
assertEquals(Bandcamp.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "2450875064"; }
|
||||||
}
|
@Override public String expectedUrlContains() throws Exception { return "https://toupie.bandcamp.com/album"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://toupie.bandcamp.com/album"; }
|
||||||
@Test
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.PLAYLIST; }
|
||||||
@Override
|
@Override public boolean expectedHasMoreItems() { return false; }
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.ALBUMS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("2450875064", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://toupie.bandcamp.com/album", extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://toupie.bandcamp.com/album", extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
// Bandcamp only return a single page
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,10 +3,14 @@ package org.schabi.newpipe.extractor.services.peertube;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
||||||
|
import org.schabi.newpipe.extractor.InfoItem;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||||
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
||||||
|
import org.schabi.newpipe.extractor.services.DefaultListExtractorTest;
|
||||||
import org.schabi.newpipe.extractor.services.peertube.extractors.PeertubeChannelTabExtractor;
|
import org.schabi.newpipe.extractor.services.peertube.extractors.PeertubeChannelTabExtractor;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
@ -16,7 +20,7 @@ import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestRela
|
||||||
|
|
||||||
class PeertubeAccountTabExtractorTest {
|
class PeertubeAccountTabExtractorTest {
|
||||||
|
|
||||||
static class Videos implements BaseListExtractorTest {
|
static class Videos extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static PeertubeChannelTabExtractor extractor;
|
private static PeertubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -29,60 +33,17 @@ class PeertubeAccountTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
// Extractor
|
@Override public StreamingService expectedService() throws Exception { return PeerTube; }
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
@Override public String expectedName() throws Exception { return ChannelTabs.VIDEOS; }
|
||||||
|
@Override public String expectedId() throws Exception { return "accounts/framasoft"; }
|
||||||
@Test
|
@Override public String expectedUrlContains() throws Exception { return "https://framatube.org/accounts/framasoft/videos"; }
|
||||||
@Override
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://framatube.org/accounts/framasoft/videos"; }
|
||||||
public void testServiceId() {
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
assertEquals(PeerTube.getServiceId(), extractor.getServiceId());
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Channels extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws ParsingException {
|
|
||||||
assertEquals(ChannelTabs.VIDEOS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("accounts/framasoft", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/accounts/framasoft/videos",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/accounts/framasoft/videos",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
|
||||||
// ListExtractor
|
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Channels implements BaseListExtractorTest {
|
|
||||||
private static PeertubeChannelTabExtractor extractor;
|
private static PeertubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -95,56 +56,13 @@ class PeertubeAccountTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
// Extractor
|
@Override public StreamingService expectedService() throws Exception { return PeerTube; }
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
@Override public String expectedName() throws Exception { return ChannelTabs.CHANNELS; }
|
||||||
|
@Override public String expectedId() throws Exception { return "accounts/framasoft"; }
|
||||||
@Test
|
@Override public String expectedUrlContains() throws Exception { return "https://framatube.org/accounts/framasoft/video-channels"; }
|
||||||
@Override
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://framatube.org/accounts/framasoft/video-channels"; }
|
||||||
public void testServiceId() {
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.CHANNEL; }
|
||||||
assertEquals(PeerTube.getServiceId(), extractor.getServiceId());
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testName() throws ParsingException {
|
|
||||||
assertEquals(ChannelTabs.CHANNELS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("accounts/framasoft", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/accounts/framasoft/video-channels",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/accounts/framasoft/video-channels",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
|
||||||
// ListExtractor
|
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
package org.schabi.newpipe.extractor.services.peertube;
|
package org.schabi.newpipe.extractor.services.peertube;
|
||||||
|
|
||||||
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
|
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestGetPageInNewExtractor;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
||||||
|
import org.schabi.newpipe.extractor.InfoItem;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.services.DefaultListExtractorTest;
|
||||||
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
|
||||||
import org.schabi.newpipe.extractor.services.peertube.extractors.PeertubeChannelTabExtractor;
|
import org.schabi.newpipe.extractor.services.peertube.extractors.PeertubeChannelTabExtractor;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.*;
|
|
||||||
|
|
||||||
class PeertubeChannelTabExtractorTest {
|
class PeertubeChannelTabExtractorTest {
|
||||||
|
|
||||||
static class Videos implements BaseListExtractorTest {
|
static class Videos extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static PeertubeChannelTabExtractor extractor;
|
private static PeertubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -32,61 +32,14 @@ class PeertubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
// Extractor
|
@Override public StreamingService expectedService() throws Exception { return PeerTube; }
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
@Override public String expectedName() throws Exception { return ChannelTabs.VIDEOS; }
|
||||||
|
@Override public String expectedId() throws Exception { return "video-channels/lqdn_channel@video.lqdn.fr"; }
|
||||||
@Test
|
@Override public String expectedUrlContains() throws Exception { return "https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/videos"; }
|
||||||
@Override
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/videos"; }
|
||||||
public void testServiceId() {
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
assertEquals(PeerTube.getServiceId(), extractor.getServiceId());
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testName() throws ParsingException {
|
|
||||||
assertEquals(ChannelTabs.VIDEOS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("video-channels/lqdn_channel@video.lqdn.fr", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/videos",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/videos",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
|
||||||
// ListExtractor
|
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
|
||||||
// Additional Testing
|
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testGetPageInNewExtractor() throws Exception {
|
void testGetPageInNewExtractor() throws Exception {
|
||||||
|
@ -96,7 +49,7 @@ class PeertubeChannelTabExtractorTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Playlists implements BaseListExtractorTest {
|
static class Playlists extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static PeertubeChannelTabExtractor extractor;
|
private static PeertubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -109,51 +62,17 @@ class PeertubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return PeerTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.PLAYLISTS; }
|
||||||
assertEquals(PeerTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "video-channels/lqdn_channel@video.lqdn.fr"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/video-playlists"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/video-playlists"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.PLAYLIST; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Channels extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.PLAYLISTS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("video-channels/lqdn_channel@video.lqdn.fr", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/video-playlists",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://framatube.org/video-channels/lqdn_channel@video.lqdn.fr/video-playlists",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Channels implements BaseListExtractorTest {
|
|
||||||
private static PeertubeChannelTabExtractor extractor;
|
private static PeertubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -165,48 +84,13 @@ class PeertubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return PeerTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.CHANNELS; }
|
||||||
assertEquals(PeerTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "accounts/framasoft"; }
|
||||||
}
|
@Override public String expectedUrlContains() throws Exception { return "https://framatube.org/accounts/framasoft/video-channels"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://framatube.org/accounts/framasoft/video-channels"; }
|
||||||
@Test
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.CHANNEL; }
|
||||||
@Override
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.CHANNELS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("accounts/framasoft", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://framatube.org/accounts/framasoft/video-channels",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://framatube.org/accounts/framasoft/video-channels",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,21 @@ package org.schabi.newpipe.extractor.services.soundcloud;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
import org.schabi.newpipe.downloader.DownloaderTestImpl;
|
||||||
|
import org.schabi.newpipe.extractor.InfoItem;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||||
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
||||||
|
import org.schabi.newpipe.extractor.services.DefaultListExtractorTest;
|
||||||
import org.schabi.newpipe.extractor.services.soundcloud.extractors.SoundcloudChannelTabExtractor;
|
import org.schabi.newpipe.extractor.services.soundcloud.extractors.SoundcloudChannelTabExtractor;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.schabi.newpipe.extractor.ServiceList.PeerTube;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.SoundCloud;
|
import static org.schabi.newpipe.extractor.ServiceList.SoundCloud;
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestGetPageInNewExtractor;
|
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestGetPageInNewExtractor;
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestMoreItems;
|
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestMoreItems;
|
||||||
|
@ -21,7 +25,7 @@ import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestRela
|
||||||
|
|
||||||
class SoundcloudChannelTabExtractorTest {
|
class SoundcloudChannelTabExtractorTest {
|
||||||
|
|
||||||
static class Tracks implements BaseListExtractorTest {
|
static class Tracks extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static SoundcloudChannelTabExtractor extractor;
|
private static SoundcloudChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -32,51 +36,14 @@ class SoundcloudChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return SoundCloud; }
|
||||||
public void testServiceId() throws Exception {
|
@Override public String expectedName() throws Exception { return ChannelTabs.TRACKS; }
|
||||||
assertEquals(SoundCloud.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "10494998"; }
|
||||||
}
|
@Override public String expectedUrlContains() throws Exception { return "https://soundcloud.com/liluzivert/tracks"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://soundcloud.com/liluzivert/tracks"; }
|
||||||
@Test
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
@Override
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.TRACKS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws Exception {
|
|
||||||
assertEquals("10494998", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws Exception {
|
|
||||||
assertEquals("https://soundcloud.com/liluzivert/tracks", extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://soundcloud.com/liluzivert/tracks", extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
|
||||||
// Additional Testing
|
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testGetPageInNewExtractor() throws Exception {
|
void testGetPageInNewExtractor() throws Exception {
|
||||||
|
@ -86,7 +53,7 @@ class SoundcloudChannelTabExtractorTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class Playlists implements BaseListExtractorTest {
|
static class Playlists extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static SoundcloudChannelTabExtractor extractor;
|
private static SoundcloudChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -97,50 +64,17 @@ class SoundcloudChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return SoundCloud; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.PLAYLISTS; }
|
||||||
assertEquals(SoundCloud.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "323371733"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://soundcloud.com/trackaholic/sets"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://soundcloud.com/trackaholic/sets"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.PLAYLIST; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Albums extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.PLAYLISTS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("323371733", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://soundcloud.com/trackaholic/sets", extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://soundcloud.com/trackaholic/sets", extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Albums implements BaseListExtractorTest {
|
|
||||||
private static SoundcloudChannelTabExtractor extractor;
|
private static SoundcloudChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -151,46 +85,13 @@ class SoundcloudChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return SoundCloud; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.ALBUMS; }
|
||||||
assertEquals(SoundCloud.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "4803918"; }
|
||||||
}
|
@Override public String expectedUrlContains() throws Exception { return "https://soundcloud.com/bigsean-1/albums"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://soundcloud.com/bigsean-1/albums"; }
|
||||||
@Test
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.PLAYLIST; }
|
||||||
@Override
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.ALBUMS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("4803918", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://soundcloud.com/bigsean-1/albums", extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://soundcloud.com/bigsean-1/albums", extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,30 @@
|
||||||
package org.schabi.newpipe.extractor.services.youtube;
|
package org.schabi.newpipe.extractor.services.youtube;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.schabi.newpipe.downloader.DownloaderFactory;
|
import org.schabi.newpipe.downloader.DownloaderFactory;
|
||||||
|
import org.schabi.newpipe.extractor.InfoItem;
|
||||||
import org.schabi.newpipe.extractor.NewPipe;
|
import org.schabi.newpipe.extractor.NewPipe;
|
||||||
|
import org.schabi.newpipe.extractor.StreamingService;
|
||||||
import org.schabi.newpipe.extractor.channel.ChannelExtractor;
|
import org.schabi.newpipe.extractor.channel.ChannelExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
|
||||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
import org.schabi.newpipe.extractor.services.DefaultListExtractorTest;
|
||||||
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
|
|
||||||
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
|
||||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeChannelTabExtractor;
|
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeChannelTabExtractor;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestMoreItems;
|
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestRelatedItems;
|
|
||||||
|
|
||||||
class YoutubeChannelTabExtractorTest {
|
class YoutubeChannelTabExtractorTest {
|
||||||
|
|
||||||
private static final String RESOURCE_PATH = DownloaderFactory.RESOURCE_PATH
|
private static final String RESOURCE_PATH = DownloaderFactory.RESOURCE_PATH
|
||||||
+ "services/youtube/extractor/channelTabs/";
|
+ "services/youtube/extractor/channelTabs/";
|
||||||
|
|
||||||
static class Videos implements BaseListExtractorTest {
|
static class Videos extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
private static YoutubeChannelTabExtractor extractor;
|
private static YoutubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -40,52 +36,17 @@ class YoutubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.VIDEOS; }
|
||||||
assertEquals(YouTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "UCTwECeGqMZee77BjdoYtI2Q"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UCTwECeGqMZee77BjdoYtI2Q/videos"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/user/creativecommons/videos"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Playlists extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.VIDEOS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("UCTwECeGqMZee77BjdoYtI2Q", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCTwECeGqMZee77BjdoYtI2Q/videos",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://www.youtube.com/user/creativecommons/videos",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Playlists implements BaseListExtractorTest {
|
|
||||||
private static YoutubeChannelTabExtractor extractor;
|
private static YoutubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -97,52 +58,17 @@ class YoutubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.PLAYLISTS; }
|
||||||
assertEquals(YouTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "UC2DjFE7Xf11URZqWBigcVOQ"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UC2DjFE7Xf11URZqWBigcVOQ/playlists"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/@EEVblog/playlists"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.PLAYLIST; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Channels extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.PLAYLISTS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("UC2DjFE7Xf11URZqWBigcVOQ", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UC2DjFE7Xf11URZqWBigcVOQ/playlists",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://www.youtube.com/@EEVblog/playlists",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Channels implements BaseListExtractorTest {
|
|
||||||
private static YoutubeChannelTabExtractor extractor;
|
private static YoutubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -154,52 +80,17 @@ class YoutubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.CHANNELS; }
|
||||||
assertEquals(YouTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "UC2DjFE7Xf11URZqWBigcVOQ"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UC2DjFE7Xf11URZqWBigcVOQ/channels"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/channel/UC2DjFE7Xf11URZqWBigcVOQ/channels"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.CHANNEL; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Livestreams extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.CHANNELS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("UC2DjFE7Xf11URZqWBigcVOQ", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UC2DjFE7Xf11URZqWBigcVOQ/channels",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UC2DjFE7Xf11URZqWBigcVOQ/channels",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Livestreams implements BaseListExtractorTest {
|
|
||||||
private static YoutubeChannelTabExtractor extractor;
|
private static YoutubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -211,52 +102,17 @@ class YoutubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.LIVESTREAMS; }
|
||||||
assertEquals(YouTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "UCR-DXc1voovS8nhAvccRZhg"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UCR-DXc1voovS8nhAvccRZhg/streams"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/c/JeffGeerling/streams"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class Shorts extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.LIVESTREAMS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("UCR-DXc1voovS8nhAvccRZhg", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCR-DXc1voovS8nhAvccRZhg/streams",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://www.youtube.com/c/JeffGeerling/streams",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Shorts implements BaseListExtractorTest {
|
|
||||||
private static YoutubeChannelTabExtractor extractor;
|
private static YoutubeChannelTabExtractor extractor;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
|
@ -268,130 +124,80 @@ class YoutubeChannelTabExtractorTest {
|
||||||
extractor.fetchPage();
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.SHORTS; }
|
||||||
assertEquals(YouTube.getServiceId(), extractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "UCh8gHdtzO2tXd593_bjErWg"; }
|
||||||
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UCh8gHdtzO2tXd593_bjErWg/shorts"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/channel/UCh8gHdtzO2tXd593_bjErWg/shorts"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.SHORTS, extractor.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testId() throws ParsingException {
|
|
||||||
assertEquals("UCh8gHdtzO2tXd593_bjErWg", extractor.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCh8gHdtzO2tXd593_bjErWg/shorts",
|
|
||||||
extractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCh8gHdtzO2tXd593_bjErWg/shorts",
|
|
||||||
extractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testRelatedItems() throws Exception {
|
|
||||||
defaultTestRelatedItems(extractor);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(extractor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class AgeRestrictedTabs implements BaseListExtractorTest {
|
|
||||||
private static ChannelTabExtractor videosTabExtractor;
|
|
||||||
private static ChannelTabExtractor shortsTabExtractor;
|
|
||||||
|
|
||||||
@BeforeAll
|
|
||||||
static void setUp() throws IOException, ExtractionException {
|
|
||||||
YoutubeTestsUtils.ensureStateless();
|
|
||||||
NewPipe.init(DownloaderFactory.getDownloader(RESOURCE_PATH + "ageRestricted"));
|
|
||||||
final ChannelExtractor extractor = YouTube.getChannelExtractor(
|
|
||||||
"https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig");
|
|
||||||
extractor.fetchPage();
|
|
||||||
|
|
||||||
|
// TESTS FOR TABS OF AGE RESTRICTED CHANNELS
|
||||||
// Fetching the tabs individually would use the standard tabs without fallback to
|
// Fetching the tabs individually would use the standard tabs without fallback to
|
||||||
// system playlists for stream tabs, we need to fetch the channel extractor to get the
|
// system playlists for stream tabs, we need to fetch the channel extractor to get the
|
||||||
// channel playlist tabs
|
// channel playlist tabs
|
||||||
// TODO: implement system playlists fallback in YoutubeChannelTabExtractor for stream
|
// TODO: implement system playlists fallback in YoutubeChannelTabExtractor for stream
|
||||||
// tabs
|
// tabs
|
||||||
final List<ListLinkHandler> tabs = extractor.getTabs();
|
|
||||||
videosTabExtractor = YouTube.getChannelTabExtractor(tabs.get(0));
|
static class AgeRestrictedTabsVideos extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
videosTabExtractor.fetchPage();
|
private static ChannelTabExtractor extractor;
|
||||||
shortsTabExtractor = YouTube.getChannelTabExtractor(tabs.get(1));
|
|
||||||
shortsTabExtractor.fetchPage();
|
@BeforeAll
|
||||||
|
static void setUp() throws IOException, ExtractionException {
|
||||||
|
YoutubeTestsUtils.ensureStateless();
|
||||||
|
NewPipe.init(DownloaderFactory.getDownloader(RESOURCE_PATH + "ageRestrictedTabsVideos"));
|
||||||
|
final ChannelExtractor channelExtractor = YouTube.getChannelExtractor(
|
||||||
|
"https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig");
|
||||||
|
channelExtractor.fetchPage();
|
||||||
|
|
||||||
|
// the videos tab is the first one
|
||||||
|
extractor = YouTube.getChannelTabExtractor(channelExtractor.getTabs().get(0));
|
||||||
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testServiceId() {
|
@Override public String expectedName() throws Exception { return ChannelTabs.VIDEOS; }
|
||||||
assertEquals(YouTube.getServiceId(), videosTabExtractor.getServiceId());
|
@Override public String expectedId() throws Exception { return "UCbfnHqxXs_K3kvaH-WlNlig"; }
|
||||||
assertEquals(YouTube.getServiceId(), shortsTabExtractor.getServiceId());
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/videos"; }
|
||||||
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/videos"; }
|
||||||
|
@Override public InfoItem.InfoType expectedInfoItemType() { return InfoItem.InfoType.STREAM; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
static class AgeRestrictedTabsShorts extends DefaultListExtractorTest<ChannelTabExtractor> {
|
||||||
@Override
|
private static ChannelTabExtractor extractor;
|
||||||
public void testName() throws Exception {
|
|
||||||
assertEquals(ChannelTabs.VIDEOS, videosTabExtractor.getName());
|
@BeforeAll
|
||||||
assertEquals(ChannelTabs.SHORTS, shortsTabExtractor.getName());
|
static void setUp() throws IOException, ExtractionException {
|
||||||
|
YoutubeTestsUtils.ensureStateless();
|
||||||
|
NewPipe.init(DownloaderFactory.getDownloader(RESOURCE_PATH + "ageRestrictedTabsShorts"));
|
||||||
|
final ChannelExtractor channelExtractor = YouTube.getChannelExtractor(
|
||||||
|
"https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig");
|
||||||
|
channelExtractor.fetchPage();
|
||||||
|
|
||||||
|
// the shorts tab is the second one
|
||||||
|
extractor = YouTube.getChannelTabExtractor(channelExtractor.getTabs().get(1));
|
||||||
|
extractor.fetchPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Override public ChannelTabExtractor extractor() throws Exception { return extractor; }
|
||||||
@Override
|
@Override public StreamingService expectedService() throws Exception { return YouTube; }
|
||||||
public void testId() throws ParsingException {
|
@Override public String expectedName() throws Exception { return ChannelTabs.SHORTS; }
|
||||||
assertEquals("UCbfnHqxXs_K3kvaH-WlNlig", videosTabExtractor.getId());
|
@Override public String expectedId() throws Exception { return "UCbfnHqxXs_K3kvaH-WlNlig"; }
|
||||||
assertEquals("UCbfnHqxXs_K3kvaH-WlNlig", shortsTabExtractor.getId());
|
@Override public String expectedUrlContains() throws Exception { return "https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/shorts"; }
|
||||||
}
|
@Override public String expectedOriginalUrlContains() throws Exception { return "https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/shorts"; }
|
||||||
|
@Override public boolean expectedHasMoreItems() { return false; }
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testUrl() throws ParsingException {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/videos",
|
|
||||||
videosTabExtractor.getUrl());
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/shorts",
|
|
||||||
shortsTabExtractor.getUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testOriginalUrl() throws Exception {
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/videos",
|
|
||||||
videosTabExtractor.getOriginalUrl());
|
|
||||||
assertEquals("https://www.youtube.com/channel/UCbfnHqxXs_K3kvaH-WlNlig/shorts",
|
|
||||||
shortsTabExtractor.getOriginalUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Override
|
@Override
|
||||||
public void testRelatedItems() throws Exception {
|
public void testRelatedItems() throws Exception {
|
||||||
defaultTestRelatedItems(videosTabExtractor);
|
// this channel has no shorts, so an empty page is returned by the playlist extractor
|
||||||
// No shorts on this channel, the channel tab playlist extractor should return no
|
assertTrue(extractor.getInitialPage().getItems().isEmpty());
|
||||||
// streams
|
assertTrue(extractor.getInitialPage().getErrors().isEmpty());
|
||||||
assertTrue(shortsTabExtractor.getInitialPage().getItems().isEmpty());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@Override
|
|
||||||
public void testMoreRelatedItems() throws Exception {
|
|
||||||
defaultTestMoreItems(videosTabExtractor);
|
|
||||||
// No shorts on this channel, the channel tab playlist extractor should return no
|
|
||||||
// streams
|
|
||||||
assertFalse(shortsTabExtractor.getInitialPage().hasNextPage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
"request": {
|
||||||
|
"httpMethod": "GET",
|
||||||
|
"url": "https://www.youtube.com/sw.js",
|
||||||
|
"headers": {
|
||||||
|
"Origin": [
|
||||||
|
"https://www.youtube.com"
|
||||||
|
],
|
||||||
|
"Referer": [
|
||||||
|
"https://www.youtube.com"
|
||||||
|
],
|
||||||
|
"Accept-Language": [
|
||||||
|
"en-GB, en;q\u003d0.9"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"localization": {
|
||||||
|
"languageCode": "en",
|
||||||
|
"countryCode": "GB"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": {
|
||||||
|
"responseCode": 200,
|
||||||
|
"responseMessage": "",
|
||||||
|
"responseHeaders": {
|
||||||
|
"access-control-allow-credentials": [
|
||||||
|
"true"
|
||||||
|
],
|
||||||
|
"access-control-allow-origin": [
|
||||||
|
"https://www.youtube.com"
|
||||||
|
],
|
||||||
|
"alt-svc": [
|
||||||
|
"h3\u003d\":443\"; ma\u003d2592000,h3-29\u003d\":443\"; ma\u003d2592000"
|
||||||
|
],
|
||||||
|
"cache-control": [
|
||||||
|
"private, max-age\u003d0"
|
||||||
|
],
|
||||||
|
"content-security-policy-report-only": [
|
||||||
|
"require-trusted-types-for \u0027script\u0027;report-uri /cspreport"
|
||||||
|
],
|
||||||
|
"content-type": [
|
||||||
|
"text/javascript; charset\u003dutf-8"
|
||||||
|
],
|
||||||
|
"cross-origin-opener-policy": [
|
||||||
|
"same-origin; report-to\u003d\"youtube_main\""
|
||||||
|
],
|
||||||
|
"date": [
|
||||||
|
"Sun, 06 Aug 2023 11:54:54 GMT"
|
||||||
|
],
|
||||||
|
"expires": [
|
||||||
|
"Sun, 06 Aug 2023 11:54:54 GMT"
|
||||||
|
],
|
||||||
|
"origin-trial": [
|
||||||
|
"AvC9UlR6RDk2crliDsFl66RWLnTbHrDbp+DiY6AYz/PNQ4G4tdUTjrHYr2sghbkhGQAVxb7jaPTHpEVBz0uzQwkAAAB4eyJvcmlnaW4iOiJodHRwczovL3lvdXR1YmUuY29tOjQ0MyIsImZlYXR1cmUiOiJXZWJWaWV3WFJlcXVlc3RlZFdpdGhEZXByZWNhdGlvbiIsImV4cGlyeSI6MTcxOTUzMjc5OSwiaXNTdWJkb21haW4iOnRydWV9"
|
||||||
|
],
|
||||||
|
"p3p": [
|
||||||
|
"CP\u003d\"This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl\u003den-GB for more info.\""
|
||||||
|
],
|
||||||
|
"permissions-policy": [
|
||||||
|
"ch-ua-arch\u003d*, ch-ua-bitness\u003d*, ch-ua-full-version\u003d*, ch-ua-full-version-list\u003d*, ch-ua-model\u003d*, ch-ua-wow64\u003d*, ch-ua-form-factor\u003d*, ch-ua-platform\u003d*, ch-ua-platform-version\u003d*"
|
||||||
|
],
|
||||||
|
"report-to": [
|
||||||
|
"{\"group\":\"youtube_main\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/youtube_main\"}]}"
|
||||||
|
],
|
||||||
|
"server": [
|
||||||
|
"ESF"
|
||||||
|
],
|
||||||
|
"set-cookie": [
|
||||||
|
"YSC\u003dIXSPROQ-CH8; Domain\u003d.youtube.com; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
|
||||||
|
"VISITOR_INFO1_LIVE\u003d; Domain\u003d.youtube.com; Expires\u003dMon, 09-Nov-2020 11:54:54 GMT; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
|
||||||
|
"CONSENT\u003dPENDING+942; expires\u003dTue, 05-Aug-2025 11:54:54 GMT; path\u003d/; domain\u003d.youtube.com; Secure"
|
||||||
|
],
|
||||||
|
"strict-transport-security": [
|
||||||
|
"max-age\u003d31536000"
|
||||||
|
],
|
||||||
|
"x-content-type-options": [
|
||||||
|
"nosniff"
|
||||||
|
],
|
||||||
|
"x-frame-options": [
|
||||||
|
"SAMEORIGIN"
|
||||||
|
],
|
||||||
|
"x-xss-protection": [
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"responseBody": "\n self.addEventListener(\u0027install\u0027, event \u003d\u003e {\n event.waitUntil(self.skipWaiting());\n });\n self.addEventListener(\u0027activate\u0027, event \u003d\u003e {\n event.waitUntil(\n self.clients.claim().then(() \u003d\u003e self.registration.unregister()));\n });\n ",
|
||||||
|
"latestUrl": "https://www.youtube.com/sw.js"
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -41,10 +41,10 @@
|
||||||
"same-origin; report-to\u003d\"youtube_main\""
|
"same-origin; report-to\u003d\"youtube_main\""
|
||||||
],
|
],
|
||||||
"date": [
|
"date": [
|
||||||
"Mon, 17 Jul 2023 20:14:18 GMT"
|
"Sun, 06 Aug 2023 11:55:07 GMT"
|
||||||
],
|
],
|
||||||
"expires": [
|
"expires": [
|
||||||
"Mon, 17 Jul 2023 20:14:18 GMT"
|
"Sun, 06 Aug 2023 11:55:07 GMT"
|
||||||
],
|
],
|
||||||
"origin-trial": [
|
"origin-trial": [
|
||||||
"AvC9UlR6RDk2crliDsFl66RWLnTbHrDbp+DiY6AYz/PNQ4G4tdUTjrHYr2sghbkhGQAVxb7jaPTHpEVBz0uzQwkAAAB4eyJvcmlnaW4iOiJodHRwczovL3lvdXR1YmUuY29tOjQ0MyIsImZlYXR1cmUiOiJXZWJWaWV3WFJlcXVlc3RlZFdpdGhEZXByZWNhdGlvbiIsImV4cGlyeSI6MTcxOTUzMjc5OSwiaXNTdWJkb21haW4iOnRydWV9"
|
"AvC9UlR6RDk2crliDsFl66RWLnTbHrDbp+DiY6AYz/PNQ4G4tdUTjrHYr2sghbkhGQAVxb7jaPTHpEVBz0uzQwkAAAB4eyJvcmlnaW4iOiJodHRwczovL3lvdXR1YmUuY29tOjQ0MyIsImZlYXR1cmUiOiJXZWJWaWV3WFJlcXVlc3RlZFdpdGhEZXByZWNhdGlvbiIsImV4cGlyeSI6MTcxOTUzMjc5OSwiaXNTdWJkb21haW4iOnRydWV9"
|
||||||
|
@ -62,9 +62,9 @@
|
||||||
"ESF"
|
"ESF"
|
||||||
],
|
],
|
||||||
"set-cookie": [
|
"set-cookie": [
|
||||||
"YSC\u003dgtpu5gh6Su4; Domain\u003d.youtube.com; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
|
"YSC\u003dqCdA3bmpLFQ; Domain\u003d.youtube.com; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
|
||||||
"VISITOR_INFO1_LIVE\u003d; Domain\u003d.youtube.com; Expires\u003dTue, 20-Oct-2020 20:14:18 GMT; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
|
"VISITOR_INFO1_LIVE\u003d; Domain\u003d.youtube.com; Expires\u003dMon, 09-Nov-2020 11:55:07 GMT; Path\u003d/; Secure; HttpOnly; SameSite\u003dnone",
|
||||||
"CONSENT\u003dPENDING+016; expires\u003dWed, 16-Jul-2025 20:14:18 GMT; path\u003d/; domain\u003d.youtube.com; Secure"
|
"CONSENT\u003dPENDING+717; expires\u003dTue, 05-Aug-2025 11:55:07 GMT; path\u003d/; domain\u003d.youtube.com; Secure"
|
||||||
],
|
],
|
||||||
"strict-transport-security": [
|
"strict-transport-security": [
|
||||||
"max-age\u003d31536000"
|
"max-age\u003d31536000"
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue