File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .schabi .newpipe .extractor .services .youtube ;
22
3- import org .junit .Ignore ;
43import org .junit .Test ;
5- import org .schabi .newpipe .downloader .DownloaderTestImpl ;
4+ import org .schabi .newpipe .downloader .DownloaderFactory ;
65import org .schabi .newpipe .extractor .ListExtractor ;
76import org .schabi .newpipe .extractor .NewPipe ;
87import org .schabi .newpipe .extractor .channel .ChannelExtractor ;
2322/**
2423 * A class that tests multiple channels and ranges of "time ago".
2524 */
26- @ Ignore ("Should be ran manually from time to time, as it's too time consuming." )
2725public class YoutubeChannelLocalizationTest {
28- private static final boolean DEBUG = true ;
26+ private static final String RESOURCE_PATH = DownloaderFactory .RESOURCE_PATH + "services/youtube/extractor/channel/" ;
27+ private static final boolean DEBUG = false ;
2928 private final DateTimeFormatter dateTimeFormatter = DateTimeFormatter .ofPattern ("yyyy-MM-dd HH:mm" );
3029
3130 @ Test
3231 public void testAllSupportedLocalizations () throws Exception {
33- NewPipe .init (DownloaderTestImpl .getInstance ());
32+ YoutubeParsingHelper .resetClientVersionAndKey ();
33+ NewPipe .init (new DownloaderFactory ().getDownloader (RESOURCE_PATH + "localization" ));
3434
3535 testLocalizationsFor ("https://www.youtube.com/user/NBCNews" );
3636 testLocalizationsFor ("https://www.youtube.com/channel/UCcmpeVbSSQlZRvHfdC-CRwg/videos" );
You can’t perform that action at this time.
0 commit comments