Skip to content

Commit

Permalink
RUMBLE: now Trending shows also older videos and not repeat the newest
Browse files Browse the repository at this point in the history
  • Loading branch information
evermind-zz committed Sep 9, 2023
1 parent 61d23c3 commit bba0494
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,17 @@ public ListExtractor.InfoItemsPage<StreamInfoItem> extractAndGetInfoItemsFromPag

final Page nextPage = rumbleCommonCodeTrendingAndSearching
.getNewPageIfThereAreMoreThanOnePageResults(
infoItemsList.size(), doc, baseUrl + "?page=");
infoItemsList.size(), doc, generateNextPageUrl(baseUrl, "page="));

return new ListExtractor.InfoItemsPage<>(collector, nextPage);
}

private String generateNextPageUrl(final String url,
final String pageParameter) {
if (url.contains("?")) {
// already parameterized -> append parameter
return url + '&' + pageParameter;
}
return url + '?' + pageParameter;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public InfoItemsPage<StreamInfoItem> getPage(final Page page)
}

doc = Jsoup.parse(getDownloader().get(
getUrl(),
page.getUrl(),
RumbleParsingHelper.getMinimalHeaders(),
NewPipe.getPreferredLocalization())
.responseBody());
Expand Down

0 comments on commit bba0494

Please sign in to comment.