11package org .schabi .newpipe .extractor .search ;
22
33import org .schabi .newpipe .extractor .InfoItem ;
4+ import org .schabi .newpipe .extractor .ListExtractor ;
45import org .schabi .newpipe .extractor .ListInfo ;
6+ import org .schabi .newpipe .extractor .StreamingService ;
57import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
6- import org .schabi .newpipe .extractor .exceptions .ParsingException ;
78import org .schabi .newpipe .extractor .uih .SearchQIHandler ;
89
10+ import java .io .IOException ;
11+
12+
913public class SearchInfo extends ListInfo <InfoItem > {
1014
1115 private String searchString ;
1216 private String searchSuggestion ;
1317
1418 public SearchInfo (int serviceId ,
1519 SearchQIHandler qIHandler ,
16- String searchString ) throws ParsingException {
20+ String searchString ) {
1721 super (serviceId , qIHandler , "Search" );
1822 this .searchString = searchString ;
1923 }
2024
2125
22- public static SearchInfo getInfo (SearchExtractor extractor ) throws ExtractionException {
26+ public static SearchInfo getInfo (SearchExtractor extractor ) {
2327 final SearchInfo info = new SearchInfo (
2428 extractor .getServiceId (),
2529 extractor .getUIHandler (),
@@ -34,6 +38,15 @@ public static SearchInfo getInfo(SearchExtractor extractor) throws ExtractionExc
3438 return info ;
3539 }
3640
41+
42+ public static ListExtractor .InfoItemsPage <InfoItem > getMoreItems (StreamingService service ,
43+ SearchQIHandler query ,
44+ String contentCountry ,
45+ String pageUrl )
46+ throws IOException , ExtractionException {
47+ return service .getSearchExtractor (query , contentCountry ).getPage (pageUrl );
48+ }
49+
3750 // Getter
3851 public String getSearchString () {
3952 return searchString ;
0 commit comments