File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/com/rarchives/ripme/ripper/rippers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1010import java .io .IOException ;
1111import java .io .UnsupportedEncodingException ;
1212import java .net .MalformedURLException ;
13+ import java .net .URI ;
14+ import java .net .URISyntaxException ;
1315import java .net .URL ;
1416import java .net .URLEncoder ;
1517import java .util .ArrayList ;
@@ -27,10 +29,10 @@ public LusciousRipper(URL url) throws IOException {
2729 }
2830
2931 @ Override
30- public URL sanitizeURL (URL url ) throws MalformedURLException {
32+ public URL sanitizeURL (URL url ) throws MalformedURLException , URISyntaxException {
3133 String URLToReturn = url .toExternalForm ();
3234 URLToReturn = URLToReturn .replaceAll ("https?://(?:www\\ .)?luscious\\ ." , "https://old.luscious." );
33- URL san_url = new URL (URLToReturn );
35+ URL san_url = new URI (URLToReturn ). toURL ( );
3436 LOGGER .info ("sanitized URL is " + san_url .toExternalForm ());
3537 return san_url ;
3638 }
You can’t perform that action at this time.
0 commit comments