mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-08-31 06:15:37 +00:00
[YouTube] Move Trending kiosk to kiosk package, add deprecation comment
Trending is still working at the time this commit is made, it has been just removed from the interface. Also remove getInstance method of YoutubeTrendingLinkHandlerFactory to make the INSTANCE static field public, for consistency with other kiosks of the service.
This commit is contained in:
@@ -35,7 +35,7 @@ import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSearchExt
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSubscriptionExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeTrendingExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeTrendingExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeLiveExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeTrendingGamingVideosExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeTrendingMoviesAndShowsTrailersExtractor;
|
||||
@@ -164,7 +164,7 @@ public class YoutubeService extends StreamingService {
|
||||
@Override
|
||||
public KioskList getKioskList() throws ExtractionException {
|
||||
final KioskList list = new KioskList(this);
|
||||
final ListLinkHandlerFactory trendingLHF = YoutubeTrendingLinkHandlerFactory.getInstance();
|
||||
final ListLinkHandlerFactory trendingLHF = YoutubeTrendingLinkHandlerFactory.INSTANCE;
|
||||
final ListLinkHandlerFactory runningLivesLHF =
|
||||
YoutubeLiveLinkHandlerFactory.INSTANCE;
|
||||
final ListLinkHandlerFactory trendingPodcastsEpisodesLHF =
|
||||
@@ -218,6 +218,7 @@ public class YoutubeService extends StreamingService {
|
||||
trendingMusicLHF,
|
||||
YoutubeTrendingMusicLinkHandlerFactory.KIOSK_ID
|
||||
);
|
||||
// Deprecated (i.e. removed from the interface of YouTube) since July 21, 2025
|
||||
list.addKioskEntry(
|
||||
(streamingService, url, id) -> new YoutubeTrendingExtractor(
|
||||
YoutubeService.this,
|
||||
|
@@ -18,7 +18,7 @@
|
||||
* along with NewPipe Extractor. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.schabi.newpipe.extractor.services.youtube.extractors;
|
||||
package org.schabi.newpipe.extractor.services.youtube.extractors.kiosk;
|
||||
|
||||
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getJsonPostResponse;
|
||||
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getTextAtKey;
|
||||
@@ -36,6 +36,7 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||
import org.schabi.newpipe.extractor.kiosk.KioskExtractor;
|
||||
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
|
||||
import org.schabi.newpipe.extractor.localization.TimeAgoParser;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamInfoItemExtractor;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
|
||||
import org.schabi.newpipe.extractor.stream.StreamInfoItemsCollector;
|
||||
|
@@ -33,16 +33,12 @@ import java.util.List;
|
||||
|
||||
public final class YoutubeTrendingLinkHandlerFactory extends ListLinkHandlerFactory {
|
||||
|
||||
private static final YoutubeTrendingLinkHandlerFactory INSTANCE =
|
||||
public static final YoutubeTrendingLinkHandlerFactory INSTANCE =
|
||||
new YoutubeTrendingLinkHandlerFactory();
|
||||
|
||||
private YoutubeTrendingLinkHandlerFactory() {
|
||||
}
|
||||
|
||||
public static YoutubeTrendingLinkHandlerFactory getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public String getUrl(final String id,
|
||||
final List<String> contentFilters,
|
||||
final String sortFilter)
|
||||
|
@@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.schabi.newpipe.extractor.exceptions.ParsingException;
|
||||
import org.schabi.newpipe.extractor.services.BaseListExtractorTest;
|
||||
import org.schabi.newpipe.extractor.services.DefaultSimpleExtractorTest;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeTrendingExtractor;
|
||||
import org.schabi.newpipe.extractor.services.youtube.extractors.kiosk.YoutubeTrendingExtractor;
|
||||
|
||||
public class YoutubeKioskExtractorTest {
|
||||
|
||||
|
Reference in New Issue
Block a user