diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleCommonCodeTrendingAndChannel.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleCommonCodeTrendingAndChannel.java index f5c675c4d9..eeaaa4c224 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleCommonCodeTrendingAndChannel.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleCommonCodeTrendingAndChannel.java @@ -50,8 +50,17 @@ public ListExtractor.InfoItemsPage 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; + } } diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleTrendingExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleTrendingExtractor.java index 9702cb715d..35cf8f3276 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleTrendingExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/rumble/extractors/RumbleTrendingExtractor.java @@ -59,7 +59,7 @@ public InfoItemsPage getPage(final Page page) } doc = Jsoup.parse(getDownloader().get( - getUrl(), + page.getUrl(), RumbleParsingHelper.getMinimalHeaders(), NewPipe.getPreferredLocalization()) .responseBody());