Interface StreamInfoItemExtractor
-
- All Superinterfaces:
InfoItemExtractor
- All Known Implementing Classes:
BandcampDiscographStreamInfoItemExtractor
,BandcampPlaylistStreamInfoItemExtractor
,BandcampRadioInfoItemExtractor
,BandcampSearchStreamInfoItemExtractor
,BandcampStreamInfoItemExtractor
,MediaCCCLiveStreamKioskExtractor
,MediaCCCRecentKioskExtractor
,MediaCCCStreamInfoItemExtractor
,PeertubeSepiaStreamInfoItemExtractor
,PeertubeStreamInfoItemExtractor
,SoundcloudStreamInfoItemExtractor
,YoutubeFeedInfoItemExtractor
,YoutubeMusicSongOrVideoInfoItemExtractor
,YoutubeReelInfoItemExtractor
,YoutubeStreamInfoItemExtractor
public interface StreamInfoItemExtractor extends InfoItemExtractor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description long
getDuration()
Get the stream duration in secondsdefault java.lang.String
getShortDescription()
Get the video's short description.StreamType
getStreamType()
Get the stream typejava.lang.String
getTextualUploadDate()
The original textual date provided by the service.DateWrapper
getUploadDate()
Extracts the upload date and time of this item and parses it.default java.util.List<Image>
getUploaderAvatars()
Get the uploader avatars.java.lang.String
getUploaderName()
Get the uploader namejava.lang.String
getUploaderUrl()
long
getViewCount()
Parses the number of viewsboolean
isAd()
Check if the stream is an ad.default boolean
isShortFormContent()
Whether the stream is a short-form content.boolean
isUploaderVerified()
Whether the uploader has been verified by the service's provider.-
Methods inherited from interface org.schabi.newpipe.extractor.InfoItemExtractor
getName, getThumbnails, getUrl
-
-
-
-
Method Detail
-
getStreamType
StreamType getStreamType() throws ParsingException
Get the stream type- Returns:
- the stream type
- Throws:
ParsingException
- if there is an error in the extraction
-
isAd
boolean isAd() throws ParsingException
Check if the stream is an ad.- Returns:
true
if the stream is an ad.- Throws:
ParsingException
- if there is an error in the extraction
-
getDuration
long getDuration() throws ParsingException
Get the stream duration in seconds- Returns:
- the stream duration in seconds or -1 if no duration is available
- Throws:
ParsingException
- if there is an error in the extraction
-
getViewCount
long getViewCount() throws ParsingException
Parses the number of views- Returns:
- the number of views or -1 for live streams
- Throws:
ParsingException
- if there is an error in the extraction
-
getUploaderName
java.lang.String getUploaderName() throws ParsingException
Get the uploader name- Returns:
- the uploader name
- Throws:
ParsingException
- if there is an error in the extraction
-
getUploaderUrl
java.lang.String getUploaderUrl() throws ParsingException
- Throws:
ParsingException
-
getUploaderAvatars
@Nonnull default java.util.List<Image> getUploaderAvatars() throws ParsingException
Get the uploader avatars.- Returns:
- the uploader avatars or an empty list if not provided by the service
- Throws:
ParsingException
- if there is an error in the extraction
-
isUploaderVerified
boolean isUploaderVerified() throws ParsingException
Whether the uploader has been verified by the service's provider. If there is no verification implemented, returnfalse
.- Returns:
- whether the uploader has been verified by the service's provider
- Throws:
ParsingException
- if there is an error in the extraction
-
getTextualUploadDate
@Nullable java.lang.String getTextualUploadDate() throws ParsingException
The original textual date provided by the service. Should be used as a fallback ifgetUploadDate()
isn't provided by the service, or it fails for some reason.- Returns:
- The original textual date provided by the service or
null
if not provided. - Throws:
ParsingException
- if there is an error in the extraction- See Also:
getUploadDate()
-
getUploadDate
@Nullable DateWrapper getUploadDate() throws ParsingException
Extracts the upload date and time of this item and parses it.If the service doesn't provide an exact time, an approximation can be returned.
If the service doesn't provide any date at all, thennull
should be returned.- Returns:
- The date and time (can be approximated) this item was uploaded or
null
. - Throws:
ParsingException
- if there is an error in the extraction or the extracted date couldn't be parsed- See Also:
getTextualUploadDate()
-
getShortDescription
@Nullable default java.lang.String getShortDescription() throws ParsingException
Get the video's short description.- Returns:
- The video's short description or
null
if not provided by the service. - Throws:
ParsingException
- if there is an error in the extraction
-
isShortFormContent
default boolean isShortFormContent() throws ParsingException
Whether the stream is a short-form content.Short-form contents are contents in the style of TikTok, YouTube Shorts, or Instagram Reels videos.
- Returns:
- whether the stream is a short-form content
- Throws:
ParsingException
- if there is an error in the extraction
-
-