Overview
TheStreamingService class is an abstract base class that defines the interface for all streaming service implementations in NewPipe Extractor. Each supported service (YouTube, SoundCloud, etc.) extends this class.
This class provides:
- Service identification and metadata
- Factory methods for creating extractors
- Link handler factories for different content types
- Localization support
- URL type detection
Constructor
StreamingService()
Create a new streaming service instance.The unique identifier for this service
The name of the service
The media capabilities this service supports (AUDIO, VIDEO, LIVE, COMMENTS)
Service Information
getServiceId()
Get the unique identifier of this service.The service ID
getServiceInfo()
Get metadata about this service.Service information including name and capabilities
getBaseUrl()
Get the base URL of this service.The base URL (e.g., “https://www.youtube.com”)
Link Handler Factories
getStreamLHFactory()
Get the link handler factory for streams/videos.Factory for creating stream link handlers
getChannelLHFactory()
Get the link handler factory for channels.Factory for creating channel link handlers, or null if not supported
getChannelTabLHFactory()
Get the link handler factory for channel tabs.Factory for creating channel tab link handlers, or null if not supported
getPlaylistLHFactory()
Get the link handler factory for playlists.Factory for creating playlist link handlers, or null if not supported
getSearchQHFactory()
Get the search query handler factory.Factory for creating search query handlers
getCommentsLHFactory()
Get the link handler factory for comments.Factory for creating comment link handlers
Extractor Creation
getSearchExtractor()
Create a search extractor.The search query handler specifying keywords and filters
A new search extractor instance
getSearchExtractor() with Parameters
Create a search extractor with explicit parameters.The search query
Content filters to apply
Sort filter to apply
A new search extractor instance
If the extractor cannot be created
getSearchExtractor() Simple
Create a search extractor with just a query.The search query
A new search extractor instance
If the extractor cannot be created
getStreamExtractor()
Create a stream/video extractor.The link handler for the stream
A new stream extractor instance
If the extractor cannot be created
getStreamExtractor() by URL
Create a stream extractor from a URL.The stream URL
A new stream extractor instance
If the extractor cannot be created
getChannelExtractor()
Create a channel extractor.The link handler for the channel
A new channel extractor instance
If the extractor cannot be created
getChannelExtractor() by URL
Create a channel extractor from a URL.The channel URL
A new channel extractor instance
If the extractor cannot be created
getChannelTabExtractor()
Create a channel tab extractor.The link handler for the channel tab
A new channel tab extractor instance
If the extractor cannot be created
getChannelTabExtractorFromId()
Create a channel tab extractor from channel ID and tab name.The channel ID
The tab name (e.g., “videos”, “playlists”)
A new channel tab extractor instance
If the extractor cannot be created
getPlaylistExtractor()
Create a playlist extractor.The link handler for the playlist
A new playlist extractor instance
If the extractor cannot be created
getPlaylistExtractor() by URL
Create a playlist extractor from a URL.The playlist URL
A new playlist extractor instance
If the extractor cannot be created
getCommentsExtractor()
Create a comments extractor.The link handler for the comments
A new comments extractor instance
If the extractor cannot be created
getCommentsExtractor() by URL
Create a comments extractor from a URL.The video URL
A new comments extractor instance, or null if not supported
If the extractor cannot be created
getSuggestionExtractor()
Create a suggestion extractor for search suggestions.A new suggestion extractor instance
getKioskList()
Get the kiosk list for this service.The kiosk list containing trending/featured content
If the kiosk list cannot be created
getFeedExtractor()
Get a feed extractor for subscription feeds.The feed URL
A feed extractor instance, or null if not supported
If the extractor cannot be created
URL Utilities
getLinkTypeByUrl()
Determine what type of content a URL points to.The URL to check
The link type: STREAM, CHANNEL, PLAYLIST, or NONE
If the URL cannot be parsed
Localization
getSupportedLocalizations()
Get all localizations supported by this service.List of supported localizations
getSupportedCountries()
Get all content countries supported by this service.List of supported content countries
getLocalization()
Get the active localization for this service based on user preferences.The active localization
getContentCountry()
Get the active content country for this service based on user preferences.The active content country
getTimeAgoParser()
Get a time ago parser for the specified localization.The localization to get a parser for
A time ago parser instance
If the localization is not supported
Enums
LinkType
Represents the type of content a URL points to.NONE- URL is not recognizedSTREAM- URL points to a video/streamCHANNEL- URL points to a channelPLAYLIST- URL points to a playlist
ServiceInfo.MediaCapability
Represents media capabilities of a service.AUDIO- Service supports audio contentVIDEO- Service supports video contentLIVE- Service supports live streamingCOMMENTS- Service supports comments