Class YoutubeService
- java.lang.Object
-
- org.schabi.newpipe.extractor.StreamingService
-
- org.schabi.newpipe.extractor.services.youtube.YoutubeService
-
public class YoutubeService extends StreamingService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.schabi.newpipe.extractor.StreamingService
StreamingService.LinkType, StreamingService.ServiceInfo
-
-
Constructor Summary
Constructors Constructor Description YoutubeService(int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseUrl()
ChannelExtractor
getChannelExtractor(ListLinkHandler linkHandler)
Must create a new instance of a ChannelExtractor implementation.ListLinkHandlerFactory
getChannelLHFactory()
Must return a new instance of an implementation of ListLinkHandlerFactory for channels.ChannelTabExtractor
getChannelTabExtractor(ListLinkHandler linkHandler)
Must create a new instance of a ChannelTabExtractor implementation.ListLinkHandlerFactory
getChannelTabLHFactory()
Must return a new instance of an implementation of ListLinkHandlerFactory for channel tabs.CommentsExtractor
getCommentsExtractor(ListLinkHandler urlIdHandler)
ListLinkHandlerFactory
getCommentsLHFactory()
FeedExtractor
getFeedExtractor(java.lang.String channelUrl)
This method decides which strategy will be chosen to fetch the feed.KioskList
getKioskList()
Must create a new instance of a KioskList implementation.PlaylistExtractor
getPlaylistExtractor(ListLinkHandler linkHandler)
Must crete a new instance of a PlaylistExtractor implementation.ListLinkHandlerFactory
getPlaylistLHFactory()
Must return a new instance of an implementation of ListLinkHandlerFactory for playlists.SearchExtractor
getSearchExtractor(SearchQueryHandler query)
Must create a new instance of a SearchExtractor implementation.SearchQueryHandlerFactory
getSearchQHFactory()
Must return an instance of an implementation of SearchQueryHandlerFactory.StreamExtractor
getStreamExtractor(LinkHandler linkHandler)
Must create a new instance of a StreamExtractor implementation.LinkHandlerFactory
getStreamLHFactory()
Must return a new instance of an implementation of LinkHandlerFactory for streams.SubscriptionExtractor
getSubscriptionExtractor()
Outdated or obsolete.SuggestionExtractor
getSuggestionExtractor()
Must create a new instance of a SuggestionExtractor implementation.java.util.List<ContentCountry>
getSupportedCountries()
Returns a list of countries that this service supports.java.util.List<Localization>
getSupportedLocalizations()
Returns a list of localizations that this service supports.-
Methods inherited from class org.schabi.newpipe.extractor.StreamingService
getChannelExtractor, getChannelExtractor, getChannelTabExtractorFromId, getChannelTabExtractorFromIdAndBaseUrl, getCommentsExtractor, getContentCountry, getLinkTypeByUrl, getLocalization, getPlaylistExtractor, getPlaylistExtractor, getSearchExtractor, getSearchExtractor, getServiceId, getServiceInfo, getStreamExtractor, getTimeAgoParser, toString
-
-
-
-
Method Detail
-
getBaseUrl
public java.lang.String getBaseUrl()
- Specified by:
getBaseUrl
in classStreamingService
-
getStreamLHFactory
public LinkHandlerFactory getStreamLHFactory()
Description copied from class:StreamingService
Must return a new instance of an implementation of LinkHandlerFactory for streams.- Specified by:
getStreamLHFactory
in classStreamingService
- Returns:
- an instance of a LinkHandlerFactory for streams
-
getChannelLHFactory
public ListLinkHandlerFactory getChannelLHFactory()
Description copied from class:StreamingService
Must return a new instance of an implementation of ListLinkHandlerFactory for channels. If support for channels is not given null must be returned.- Specified by:
getChannelLHFactory
in classStreamingService
- Returns:
- an instance of a ListLinkHandlerFactory for channels or null
-
getChannelTabLHFactory
public ListLinkHandlerFactory getChannelTabLHFactory()
Description copied from class:StreamingService
Must return a new instance of an implementation of ListLinkHandlerFactory for channel tabs. If support for channel tabs is not given null must be returned.- Specified by:
getChannelTabLHFactory
in classStreamingService
- Returns:
- an instance of a ListLinkHandlerFactory for channels or null
-
getPlaylistLHFactory
public ListLinkHandlerFactory getPlaylistLHFactory()
Description copied from class:StreamingService
Must return a new instance of an implementation of ListLinkHandlerFactory for playlists. If support for playlists is not given null must be returned.- Specified by:
getPlaylistLHFactory
in classStreamingService
- Returns:
- an instance of a ListLinkHandlerFactory for playlists or null
-
getSearchQHFactory
public SearchQueryHandlerFactory getSearchQHFactory()
Description copied from class:StreamingService
Must return an instance of an implementation of SearchQueryHandlerFactory.- Specified by:
getSearchQHFactory
in classStreamingService
- Returns:
- an instance of a SearchQueryHandlerFactory
-
getStreamExtractor
public StreamExtractor getStreamExtractor(LinkHandler linkHandler)
Description copied from class:StreamingService
Must create a new instance of a StreamExtractor implementation.- Specified by:
getStreamExtractor
in classStreamingService
- Parameters:
linkHandler
- is pointing to the stream which should be handled by this new instance.- Returns:
- a new StreamExtractor
-
getChannelExtractor
public ChannelExtractor getChannelExtractor(ListLinkHandler linkHandler)
Description copied from class:StreamingService
Must create a new instance of a ChannelExtractor implementation.- Specified by:
getChannelExtractor
in classStreamingService
- Parameters:
linkHandler
- is pointing to the channel which should be handled by this new instance.- Returns:
- a new ChannelExtractor
-
getChannelTabExtractor
public ChannelTabExtractor getChannelTabExtractor(ListLinkHandler linkHandler)
Description copied from class:StreamingService
Must create a new instance of a ChannelTabExtractor implementation.- Specified by:
getChannelTabExtractor
in classStreamingService
- Parameters:
linkHandler
- is pointing to the channel which should be handled by this new instance.- Returns:
- a new ChannelTabExtractor
-
getPlaylistExtractor
public PlaylistExtractor getPlaylistExtractor(ListLinkHandler linkHandler)
Description copied from class:StreamingService
Must crete a new instance of a PlaylistExtractor implementation.- Specified by:
getPlaylistExtractor
in classStreamingService
- Parameters:
linkHandler
- is pointing to the playlist which should be handled by this new instance.- Returns:
- a new PlaylistExtractor
-
getSearchExtractor
public SearchExtractor getSearchExtractor(SearchQueryHandler query)
Description copied from class:StreamingService
Must create a new instance of a SearchExtractor implementation.- Specified by:
getSearchExtractor
in classStreamingService
- Parameters:
query
- specifies the keyword lock for, and the filters which should be applied.- Returns:
- a new SearchExtractor instance
-
getSuggestionExtractor
public SuggestionExtractor getSuggestionExtractor()
Description copied from class:StreamingService
Must create a new instance of a SuggestionExtractor implementation.- Specified by:
getSuggestionExtractor
in classStreamingService
- Returns:
- a new SuggestionExtractor instance
-
getKioskList
public KioskList getKioskList() throws ExtractionException
Description copied from class:StreamingService
Must create a new instance of a KioskList implementation.- Specified by:
getKioskList
in classStreamingService
- Returns:
- a new KioskList instance
- Throws:
ExtractionException
-
getSubscriptionExtractor
public SubscriptionExtractor getSubscriptionExtractor()
Description copied from class:StreamingService
Outdated or obsolete. null can be returned.- Specified by:
getSubscriptionExtractor
in classStreamingService
- Returns:
- just null
-
getFeedExtractor
@Nonnull public FeedExtractor getFeedExtractor(java.lang.String channelUrl) throws ExtractionException
Description copied from class:StreamingService
This method decides which strategy will be chosen to fetch the feed. In YouTube, for example, a separate feed exists which is lightweight and made specifically to be used like this.In services which there's no other way to retrieve them, null should be returned.
- Overrides:
getFeedExtractor
in classStreamingService
- Returns:
- a
FeedExtractor
instance or null. - Throws:
ExtractionException
-
getCommentsLHFactory
public ListLinkHandlerFactory getCommentsLHFactory()
- Specified by:
getCommentsLHFactory
in classStreamingService
-
getCommentsExtractor
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler) throws ExtractionException
- Specified by:
getCommentsExtractor
in classStreamingService
- Throws:
ExtractionException
-
getSupportedLocalizations
public java.util.List<Localization> getSupportedLocalizations()
Description copied from class:StreamingService
Returns a list of localizations that this service supports.- Overrides:
getSupportedLocalizations
in classStreamingService
-
getSupportedCountries
public java.util.List<ContentCountry> getSupportedCountries()
Description copied from class:StreamingService
Returns a list of countries that this service supports.- Overrides:
getSupportedCountries
in classStreamingService
-
-