Skip to content

Commit

Permalink
Update News.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoeMeow1027 committed Sep 21, 2024
1 parent ae3160e commit da36f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/dutwrapper/dutwrapper/News.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private static ArrayList<NewsItem> getNews(
newsType == null ? NewsType.Global.toString() : newsType.toString(),
page == null ? 1 : page,
searchType == null ? NewsSearchType.ByTitle.toString() : searchType.toString(),
URLEncoder.encode(searchQuery == null ? "" : searchQuery, StandardCharsets.UTF_8.toString()));
URLEncoder.encode(searchQuery == null ? "" : searchQuery, "UTF-8"));

HttpClientWrapper.Response response = HttpClientWrapper.get(url, null, 60);
response.throwExceptionIfExist();
Expand All @@ -352,7 +352,7 @@ private static ArrayList<NewsItem> getNews(
}

Document webData = Jsoup.parse(response.getContent());
webData.outputSettings().charset(StandardCharsets.UTF_8);
webData.outputSettings().charset("UTF-8");
for (Element el : webData.getElementsByTag("br")) {
el.remove();
}
Expand Down

0 comments on commit da36f56

Please sign in to comment.