mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-09-09 05:30:50 +02:00
update versions, make it work with java-20
This commit is contained in:
@@ -20,7 +20,7 @@ import org.jsoup.Connection.Response;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.safety.Whitelist;
|
||||
import org.jsoup.safety.Safelist;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||
@@ -167,7 +167,7 @@ public class FuraffinityRipper extends AbstractHTMLRipper {
|
||||
ele.select("br").append("\\n");
|
||||
ele.select("p").prepend("\\n\\n");
|
||||
LOGGER.debug("Returning description at " + page);
|
||||
String tempPage = Jsoup.clean(ele.html().replaceAll("\\\\n", System.getProperty("line.separator")), "", Whitelist.none(), new Document.OutputSettings().prettyPrint(false));
|
||||
String tempPage = Jsoup.clean(ele.html().replaceAll("\\\\n", System.getProperty("line.separator")), "", Safelist.none(), new Document.OutputSettings().prettyPrint(false));
|
||||
return documentz.select("meta[property=og:title]").attr("content") + "\n" + tempPage; // Overridden saveText takes first line and makes it the file name.
|
||||
} catch (IOException ioe) {
|
||||
LOGGER.info("Failed to get description " + page + " : '" + ioe.getMessage() + "'");
|
||||
|
@@ -16,7 +16,7 @@ import org.json.JSONObject;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.safety.Whitelist;
|
||||
import org.jsoup.safety.Safelist;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
import com.rarchives.ripme.ripper.AlbumRipper;
|
||||
@@ -256,10 +256,10 @@ public class ImgurRipper extends AlbumRipper {
|
||||
LOGGER.info(" Retrieving " + strUrl);
|
||||
Document doc = getAlbumData("https://api.imgur.com/3/album/" + strUrl.split("/a/")[1]);
|
||||
// Try to use embedded JSON to retrieve images
|
||||
LOGGER.info(Jsoup.clean(doc.body().toString(), Whitelist.none()));
|
||||
LOGGER.info(Jsoup.clean(doc.body().toString(), Safelist.none()));
|
||||
|
||||
try {
|
||||
JSONObject json = new JSONObject(Jsoup.clean(doc.body().toString(), Whitelist.none()));
|
||||
JSONObject json = new JSONObject(Jsoup.clean(doc.body().toString(), Safelist.none()));
|
||||
JSONArray jsonImages = json.getJSONObject("data").getJSONArray("images");
|
||||
return createImgurAlbumFromJsonArray(url, jsonImages);
|
||||
} catch (JSONException e) {
|
||||
|
Reference in New Issue
Block a user