mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-18 03:31:24 +02:00
new URI instead of new URL, flickr, hqporn.
This commit is contained in:
@@ -130,8 +130,8 @@ public class FlickrRipper extends AbstractHTMLRipper {
|
|||||||
String apiURL = null;
|
String apiURL = null;
|
||||||
try {
|
try {
|
||||||
apiURL = apiURLBuilder(getAlbum(url.toExternalForm()), page, apiKey);
|
apiURL = apiURLBuilder(getAlbum(url.toExternalForm()), page, apiKey);
|
||||||
pageURL = new URL(apiURL);
|
pageURL = new URI(apiURL).toURL();
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException | URISyntaxException e) {
|
||||||
LOGGER.error("Unable to get api link " + apiURL + " is malformed");
|
LOGGER.error("Unable to get api link " + apiURL + " is malformed");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@@ -11,6 +11,7 @@ import org.jsoup.select.Elements;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -164,10 +165,10 @@ public class HqpornerRipper extends AbstractHTMLRipper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (downloadUrl != null) {
|
if (downloadUrl != null) {
|
||||||
addURLToDownload(new URL(downloadUrl), "", subdirectory, "", null, getVideoName(), "mp4");
|
addURLToDownload(new URI(downloadUrl).toURL(), "", subdirectory, "", null, getVideoName(), "mp4");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException | URISyntaxException e) {
|
||||||
LOGGER.error("[!] Exception while downloading video.", e);
|
LOGGER.error("[!] Exception while downloading video.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,7 +216,7 @@ public class HqpornerRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
logger.info("Trying to download from unknown video host " + videoPageurl);
|
logger.info("Trying to download from unknown video host " + videoPageurl);
|
||||||
URL url = new URL(videoPageurl);
|
URL url = new URI(videoPageurl).toURL();
|
||||||
Response response = Http.url(url).referrer(hqpornerVideoPageUrl).response();
|
Response response = Http.url(url).referrer(hqpornerVideoPageUrl).response();
|
||||||
Document doc = response.parse();
|
Document doc = response.parse();
|
||||||
|
|
||||||
@@ -245,7 +246,7 @@ public class HqpornerRipper extends AbstractHTMLRipper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException | URISyntaxException e) {
|
||||||
logger.error("Unable to get video url using generic methods.");
|
logger.error("Unable to get video url using generic methods.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user