Interface StreamInfoItemExtractor

All Superinterfaces:
InfoItemExtractor
All Known Implementing Classes:
BandcampDiscographStreamInfoItemExtractor, BandcampPlaylistStreamInfoItemExtractor, BandcampRadioInfoItemExtractor, BandcampSearchStreamInfoItemExtractor, BandcampStreamInfoItemExtractor, MediaCCCLiveStreamKioskExtractor, MediaCCCRecentKioskExtractor, MediaCCCStreamInfoItemExtractor, PeertubeSepiaStreamInfoItemExtractor, PeertubeStreamInfoItemExtractor, SoundcloudLikesInfoItemExtractor, SoundcloudStreamInfoItemExtractor, YoutubeFeedInfoItemExtractor, YoutubeMusicSongOrVideoInfoItemExtractor, YoutubeReelInfoItemExtractor, YoutubeStreamInfoItemExtractor, YoutubeStreamInfoItemLockupExtractor

public interface StreamInfoItemExtractor extends InfoItemExtractor
  • Method Details

    • 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 (or of current viewers in case of live streams)
      Returns:
      the number of views (or of current viewers in case of live streams) or -1 if not available
      Throws:
      ParsingException - if there is an error in the extraction
    • getUploaderName

      String getUploaderName() throws ParsingException
      Get the uploader name
      Returns:
      the uploader name
      Throws:
      ParsingException - if there is an error in the extraction
    • getUploaderUrl

      String getUploaderUrl() throws ParsingException
      Throws:
      ParsingException
    • getUploaderAvatars

      @Nonnull default 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, return false.
      Returns:
      whether the uploader has been verified by the service's provider
      Throws:
      ParsingException - if there is an error in the extraction
    • getTextualUploadDate

      @Nullable String getTextualUploadDate() throws ParsingException
      The original textual date provided by the service. Should be used as a fallback if getUploadDate() 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

      @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, then null 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:
    • getShortDescription

      @Nullable default 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
    • getContentAvailability

      @Nonnull default ContentAvailability getContentAvailability() throws ParsingException
      Get the availability of the stream.

      The availability may not reflect the actual availability when requesting the stream.

      Returns:
      The stream's availability
      Throws:
      ParsingException - if there is an error in the extraction