Package org.schabi.newpipe.extractor
Class Extractor
java.lang.Object
org.schabi.newpipe.extractor.Extractor
- Direct Known Subclasses:
ChannelExtractor,ListExtractor,StreamExtractor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExtractor(StreamingService service, LinkHandler linkHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidFetch the current page.voidforceContentCountry(ContentCountry contentCountry) voidforceLocalization(Localization localization) getId()abstract StringgetName()Get the nameintgetUrl()protected booleanabstract voidonFetchPage(Downloader downloader) Fetch the current page.toString()
-
Constructor Details
-
Extractor
-
-
Method Details
-
getLinkHandler
- Returns:
- The
LinkHandlerof the current extractor object (e.g. a ChannelExtractor should return a channel url handler).
-
fetchPage
Fetch the current page.- Throws:
IOException- if the page can not be loadedExtractionException- if the pages content is not understood
-
assertPageFetched
protected void assertPageFetched() -
isPageFetched
protected boolean isPageFetched() -
onFetchPage
public abstract void onFetchPage(@Nonnull Downloader downloader) throws IOException, ExtractionException Fetch the current page.- Parameters:
downloader- the downloader to use- Throws:
IOException- if the page can not be loadedExtractionException- if the pages content is not understood
-
getId
- Throws:
ParsingException
-
getName
Get the name- Returns:
- the name
- Throws:
ParsingException- if the name cannot be extracted
-
getOriginalUrl
- Throws:
ParsingException
-
getUrl
- Throws:
ParsingException
-
getBaseUrl
- Throws:
ParsingException
-
getService
-
getServiceId
public int getServiceId() -
getDownloader
-
forceLocalization
-
forceContentCountry
-
getExtractorLocalization
-
getExtractorContentCountry
-
getTimeAgoParser
-
toString
-