public class YoutubeCommentsExtractor extends CommentsExtractor
ListExtractor.InfoItemsPage<T extends InfoItem>
ITEM_COUNT_INFINITE, ITEM_COUNT_MORE_THAN_100, ITEM_COUNT_UNKNOWN
Constructor and Description |
---|
YoutubeCommentsExtractor(StreamingService service,
ListLinkHandler uiHandler) |
Modifier and Type | Method and Description |
---|---|
ListExtractor.InfoItemsPage<CommentsInfoItem> |
getInitialPage()
A
InfoItemsPage corresponding to the initial page
where the items are from the initial request and the nextPage relative to it. |
ListExtractor.InfoItemsPage<CommentsInfoItem> |
getPage(Page page)
Get a list of items corresponding to the specific requested page.
|
boolean |
isCommentsDisabled() |
void |
onFetchPage(Downloader downloader)
Fetch the current page.
|
getName
getLinkHandler
assertPageFetched, fetchPage, forceContentCountry, forceLocalization, getBaseUrl, getDownloader, getExtractorContentCountry, getExtractorLocalization, getId, getOriginalUrl, getService, getServiceId, getTimeAgoParser, getUrl, isPageFetched
public YoutubeCommentsExtractor(StreamingService service, ListLinkHandler uiHandler)
@Nonnull public ListExtractor.InfoItemsPage<CommentsInfoItem> getInitialPage() throws IOException, ExtractionException
ListExtractor
InfoItemsPage
corresponding to the initial page
where the items are from the initial request and the nextPage relative to it.getInitialPage
in class ListExtractor<CommentsInfoItem>
ListExtractor.InfoItemsPage
corresponding to the initial pageIOException
ExtractionException
public ListExtractor.InfoItemsPage<CommentsInfoItem> getPage(Page page) throws IOException, ExtractionException
ListExtractor
getPage
in class ListExtractor<CommentsInfoItem>
page
- any page got from the exclusive implementation of the list extractorListExtractor.InfoItemsPage
corresponding to the requested pageIOException
ExtractionException
ListExtractor.InfoItemsPage.getNextPage()
public void onFetchPage(@Nonnull Downloader downloader) throws IOException, ExtractionException
Extractor
onFetchPage
in class Extractor
downloader
- the downloader to useIOException
- if the page can not be loadedExtractionException
- if the pages content is not understoodpublic boolean isCommentsDisabled() throws ExtractionException
isCommentsDisabled
in class CommentsExtractor
true
if the comments are disabled otherwise false
(default)ExtractionException