R
- the info item type this list extractor providespublic abstract class ListExtractor<R extends InfoItem> extends Extractor
Modifier and Type | Class and Description |
---|---|
static class |
ListExtractor.InfoItemsPage<T extends InfoItem>
A class that is used to wrap a list of gathered items and eventual errors, it
also contains a field that points to the next available page (
ListExtractor.InfoItemsPage.nextPage ). |
Modifier and Type | Field and Description |
---|---|
static long |
ITEM_COUNT_INFINITE
Constant that should be returned whenever a list has an
infinite number of items.
|
static long |
ITEM_COUNT_MORE_THAN_100
Constant that should be returned whenever a list
has an unknown number of items bigger than 100.
|
static long |
ITEM_COUNT_UNKNOWN
Constant that should be returned whenever
a list has an unknown number of items.
|
Constructor and Description |
---|
ListExtractor(StreamingService service,
ListLinkHandler linkHandler) |
Modifier and Type | Method and Description |
---|---|
abstract ListExtractor.InfoItemsPage<R> |
getInitialPage()
A
InfoItemsPage corresponding to the initial page
where the items are from the initial request and the nextPage relative to it. |
ListLinkHandler |
getLinkHandler() |
abstract ListExtractor.InfoItemsPage<R> |
getPage(Page page)
Get a list of items corresponding to the specific requested page.
|
assertPageFetched, fetchPage, forceContentCountry, forceLocalization, getBaseUrl, getDownloader, getExtractorContentCountry, getExtractorLocalization, getId, getName, getOriginalUrl, getService, getServiceId, getTimeAgoParser, getUrl, isPageFetched, onFetchPage
public static final long ITEM_COUNT_UNKNOWN
public static final long ITEM_COUNT_INFINITE
public static final long ITEM_COUNT_MORE_THAN_100
public ListExtractor(StreamingService service, ListLinkHandler linkHandler)
@Nonnull public abstract ListExtractor.InfoItemsPage<R> getInitialPage() throws IOException, ExtractionException
InfoItemsPage
corresponding to the initial page
where the items are from the initial request and the nextPage relative to it.ListExtractor.InfoItemsPage
corresponding to the initial pageIOException
ExtractionException
public abstract ListExtractor.InfoItemsPage<R> getPage(Page page) throws IOException, ExtractionException
page
- any page got from the exclusive implementation of the list extractorListExtractor.InfoItemsPage
corresponding to the requested pageIOException
ExtractionException
ListExtractor.InfoItemsPage.getNextPage()
@Nonnull public ListLinkHandler getLinkHandler()
getLinkHandler
in class Extractor
LinkHandler
of the current extractor object (e.g. a ChannelExtractor
should return a channel url handler).