Class SubscriptionExtractor
java.lang.Object
org.schabi.newpipe.extractor.subscription.SubscriptionExtractor
- Direct Known Subclasses:
SoundcloudSubscriptionExtractor,YoutubeSubscriptionExtractor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classException that should be thrown when the input do not contain valid content that the extractor can parse (e.g. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubscriptionExtractor(StreamingService service, List<SubscriptionExtractor.ContentSource> supportedSources) -
Method Summary
Modifier and TypeMethodDescriptionfromChannelUrl(String channelUrl) Reads and parse a list ofSubscriptionItemfrom the given channel url.fromInputStream(InputStream contentInputStream) Reads and parse a list ofSubscriptionItemfrom the given InputStream.fromInputStream(InputStream contentInputStream, String contentType) Reads and parse a list ofSubscriptionItemfrom the given InputStream.abstract StringReturns an url that can help/guide the user to the file (or channel url) to extract the subscriptions.
-
Field Details
-
service
-
-
Constructor Details
-
SubscriptionExtractor
public SubscriptionExtractor(StreamingService service, List<SubscriptionExtractor.ContentSource> supportedSources)
-
-
Method Details
-
getSupportedSources
-
getRelatedUrl
Returns an url that can help/guide the user to the file (or channel url) to extract the subscriptions.For example, in YouTube, the export subscriptions url is a good choice to return here.
-
fromChannelUrl
public List<SubscriptionItem> fromChannelUrl(String channelUrl) throws IOException, ExtractionException Reads and parse a list ofSubscriptionItemfrom the given channel url.- Throws:
SubscriptionExtractor.InvalidSourceException- when the channelUrl doesn't exist or is invalidIOExceptionExtractionException
-
fromInputStream
public List<SubscriptionItem> fromInputStream(@Nonnull InputStream contentInputStream) throws ExtractionException Reads and parse a list ofSubscriptionItemfrom the given InputStream.- Throws:
SubscriptionExtractor.InvalidSourceException- when the content read from the InputStream is invalid and can not be parsedExtractionException
-
fromInputStream
public List<SubscriptionItem> fromInputStream(@Nonnull InputStream contentInputStream, @Nonnull String contentType) throws ExtractionException Reads and parse a list ofSubscriptionItemfrom the given InputStream.- Throws:
SubscriptionExtractor.InvalidSourceException- when the content read from the InputStream is invalid and can not be parsedExtractionException
-