Class ListLinkHandlerFactory
java.lang.Object
org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory
org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory
- Direct Known Subclasses:
BandcampChannelLinkHandlerFactory,BandcampChannelTabLinkHandlerFactory,BandcampCommentsLinkHandlerFactory,BandcampFeaturedLinkHandlerFactory,BandcampPlaylistLinkHandlerFactory,MediaCCCConferenceLinkHandlerFactory,MediaCCCConferencesListLinkHandlerFactory,MediaCCCLiveListLinkHandlerFactory,MediaCCCRecentListLinkHandlerFactory,PeertubeChannelLinkHandlerFactory,PeertubeChannelTabLinkHandlerFactory,PeertubeCommentsLinkHandlerFactory,PeertubePlaylistLinkHandlerFactory,PeertubeTrendingLinkHandlerFactory,SearchQueryHandlerFactory,SoundcloudChannelLinkHandlerFactory,SoundcloudChannelTabLinkHandlerFactory,SoundcloudChartsLinkHandlerFactory,SoundcloudCommentsLinkHandlerFactory,SoundcloudPlaylistLinkHandlerFactory,YoutubeChannelLinkHandlerFactory,YoutubeChannelTabLinkHandlerFactory,YoutubeCommentsLinkHandlerFactory,YoutubeLiveLinkHandlerFactory,YoutubePlaylistLinkHandlerFactory,YoutubeTrendingGamingVideosLinkHandlerFactory,YoutubeTrendingLinkHandlerFactory,YoutubeTrendingMoviesAndShowsTrailersLinkHandlerFactory,YoutubeTrendingMusicLinkHandlerFactory,YoutubeTrendingPodcastsEpisodesLinkHandlerFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds aLinkHandlerfrom a url.
Be sure to callUtils.followGoogleRedirectIfNeeded(String)on the url if overriding this function.Builds aLinkHandlerfrom an URL and a base URL.String[]Will returns content filter the corresponding extractor can handle like "channels", "videos", "music", etc.String[]Will returns sort filter the corresponding extractor can handle like "A-Z", "oldest first", "size", etc.For making ListLinkHandlerFactory compatible with LinkHandlerFactory we need to override this, however it should not be overridden by the actual implementation.abstract StringMethods inherited from class org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory
acceptUrl, getId, onAcceptUrl
-
Constructor Details
-
ListLinkHandlerFactory
public ListLinkHandlerFactory()
-
-
Method Details
-
getUrl
public abstract String getUrl(String id, List<String> contentFilter, String sortFilter) throws ParsingException, UnsupportedOperationException -
getUrl
public String getUrl(String id, List<String> contentFilter, String sortFilter, String baseUrl) throws ParsingException, UnsupportedOperationException -
fromUrl
Description copied from class:LinkHandlerFactoryBuilds aLinkHandlerfrom a url.
Be sure to callUtils.followGoogleRedirectIfNeeded(String)on the url if overriding this function.- Overrides:
fromUrlin classLinkHandlerFactory- Parameters:
url- the url to extract path and id from- Returns:
- a
LinkHandlercomplete with information - Throws:
ParsingException
-
fromUrl
Description copied from class:LinkHandlerFactoryBuilds aLinkHandlerfrom an URL and a base URL. The URL is expected to be already polished from Google search redirects (otherwise how couldbaseUrlhave been extracted?).
So do not callUtils.followGoogleRedirectIfNeeded(String)on the URL if overriding this function, since that should be done inLinkHandlerFactory.fromUrl(String).- Overrides:
fromUrlin classLinkHandlerFactory- Parameters:
url- the URL without Google search redirects to extract id frombaseUrl- the base URL- Returns:
- a
LinkHandlercomplete with information - Throws:
ParsingException
-
fromId
- Overrides:
fromIdin classLinkHandlerFactory- Throws:
ParsingException
-
fromId
- Overrides:
fromIdin classLinkHandlerFactory- Throws:
ParsingException
-
fromQuery
public ListLinkHandler fromQuery(String id, List<String> contentFilters, String sortFilter) throws ParsingException - Throws:
ParsingException
-
fromQuery
public ListLinkHandler fromQuery(String id, List<String> contentFilters, String sortFilter, String baseUrl) throws ParsingException - Throws:
ParsingException
-
getUrl
For making ListLinkHandlerFactory compatible with LinkHandlerFactory we need to override this, however it should not be overridden by the actual implementation.- Specified by:
getUrlin classLinkHandlerFactory- Returns:
- the url corresponding to id without any filters applied
- Throws:
ParsingExceptionUnsupportedOperationException
-
getUrl
- Overrides:
getUrlin classLinkHandlerFactory- Throws:
ParsingException
-
getAvailableContentFilter
Will returns content filter the corresponding extractor can handle like "channels", "videos", "music", etc.- Returns:
- filter that can be applied when building a query for getting a list
-
getAvailableSortFilter
Will returns sort filter the corresponding extractor can handle like "A-Z", "oldest first", "size", etc.- Returns:
- filter that can be applied when building a query for getting a list
-