Skip to content

Commit

Permalink
RUMBLE/BITCHUTE adjust to 'Use the new URL encode/decode methods intr…
Browse files Browse the repository at this point in the history
…oduced in Java 10 (TeamNewPipe#1196)' commit
  • Loading branch information
evermind-zz committed Jul 25, 2024
1 parent b63e778 commit c5f6d24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.schabi.newpipe.extractor.services.bitchute.search.filter.BitchuteFilters;
import org.schabi.newpipe.extractor.utils.Utils;

import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Objects;

Expand Down Expand Up @@ -40,12 +39,6 @@ public String getUrl(

final String sortQuery = searchFilters.evaluateSelectedFilters(null);

try {
return SEARCH_URL
+ Utils.encodeUrlUtf8(query)
+ Objects.requireNonNullElse(sortQuery, "");
} catch (final UnsupportedEncodingException e) {
throw new ParsingException("Could not encode query", e);
}
return SEARCH_URL + Utils.encodeUrlUtf8(query) + Objects.requireNonNullElse(sortQuery, "");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.schabi.newpipe.extractor.services.rumble.search.filter.RumbleFilters;
import org.schabi.newpipe.extractor.utils.Utils;

import java.io.UnsupportedEncodingException;
import java.util.List;

public final class RumbleSearchQueryHandlerFactory extends SearchQueryHandlerFactory {
Expand Down Expand Up @@ -36,13 +35,6 @@ public String getUrl(final String searchString,
final String sortQuery = searchFilters.evaluateSelectedSortFilters();
final String urlEndpoint = searchFilters.evaluateSelectedContentFilters();


try {
return urlEndpoint
+ Utils.encodeUrlUtf8(searchString)
+ sortQuery;
} catch (final UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return urlEndpoint + Utils.encodeUrlUtf8(searchString) + sortQuery;
}
}

0 comments on commit c5f6d24

Please sign in to comment.