Skip to content

Commit

Permalink
new URI instead of new URL, erotiv.
Browse files Browse the repository at this point in the history
  • Loading branch information
soloturn committed Dec 29, 2023
1 parent eddcd12 commit f5153de
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -56,8 +58,8 @@ public Document getFirstPage() throws IOException {
}

@Override
public URL sanitizeURL(URL url) throws MalformedURLException {
return new URL(url.toExternalForm().replaceAll("https?://www.erotiv.io", "https://erotiv.io"));
public URL sanitizeURL(URL url) throws MalformedURLException, URISyntaxException {
return new URI(url.toExternalForm().replaceAll("https?://www.erotiv.io", "https://erotiv.io")).toURL();
}

@Override
Expand Down

0 comments on commit f5153de

Please sign in to comment.