mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-26 15:24:51 +02:00
Merge pull request #1156 from cyian-1756/reduce-log-spam
Reduce log spam
This commit is contained in:
@@ -113,7 +113,6 @@ public class BatoRipper extends AbstractHTMLRipper {
|
||||
s = s.replaceAll("var prevCha = null;", "");
|
||||
s = s.replaceAll("var nextCha = \\.*;", "");
|
||||
String json = s.replaceAll("var images = ", "").replaceAll(";", "");
|
||||
LOGGER.info(s);
|
||||
JSONObject images = new JSONObject(json);
|
||||
for (int i = 1; i < images.length() +1; i++) {
|
||||
result.add(images.getString(Integer.toString(i)));
|
||||
|
@@ -111,7 +111,6 @@ public class ChanRipper extends AbstractHTMLRipper {
|
||||
|
||||
String u = url.toExternalForm();
|
||||
if (u.contains("/thread/") || u.contains("/res/") || u.contains("yuki.la") || u.contains("55chan.org")) {
|
||||
LOGGER.debug("U: " + u);
|
||||
p = Pattern.compile("^.*\\.[a-z]{1,3}/[a-zA-Z0-9]+/(thread|res)/([0-9]+)(\\.html|\\.php)?.*$");
|
||||
m = p.matcher(u);
|
||||
if (m.matches()) {
|
||||
|
@@ -213,7 +213,6 @@ public class DeviantartRipper extends AbstractJSONRipper {
|
||||
if (js.html().contains("requestid")) {
|
||||
String json = js.html().replaceAll("window.__initial_body_data=", "").replaceAll("\\);", "")
|
||||
.replaceAll(";__wake\\(.+", "");
|
||||
LOGGER.info("json: " + json);
|
||||
JSONObject j = new JSONObject(json);
|
||||
return j;
|
||||
}
|
||||
@@ -253,7 +252,6 @@ public class DeviantartRipper extends AbstractJSONRipper {
|
||||
@Override
|
||||
public List<String> getURLsFromJSON(JSONObject json) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
LOGGER.info(json);
|
||||
JSONArray results = json.getJSONObject("content").getJSONArray("results");
|
||||
for (int i = 0; i < results.length(); i++) {
|
||||
Document doc = Jsoup.parseBodyFragment(results.getJSONObject(i).getString("html"));
|
||||
|
@@ -78,7 +78,6 @@ public class FuraffinityRipper extends AbstractHTMLRipper {
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
setCookies();
|
||||
LOGGER.info(Http.url(url).cookies(cookies).get().html());
|
||||
return Http.url(url).cookies(cookies).get();
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,6 @@ public class HitomiRipper extends AbstractHTMLRipper {
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
String json = doc.text().replaceAll("var galleryinfo =", "");
|
||||
LOGGER.info(json);
|
||||
JSONArray json_data = new JSONArray(json);
|
||||
for (int i = 0; i < json_data.length(); i++) {
|
||||
result.add("https://ba.hitomi.la/galleries/" + galleryId + "/" + json_data.getJSONObject(i).getString("name"));
|
||||
|
@@ -79,7 +79,6 @@ public class ZizkiRipper extends AbstractHTMLRipper {
|
||||
// Page contains images
|
||||
LOGGER.info("Look for images.");
|
||||
for (Element thumb : page.select("img")) {
|
||||
LOGGER.info("Img");
|
||||
if (super.isStopped()) break;
|
||||
// Find thumbnail image source
|
||||
String image = null;
|
||||
|
@@ -58,7 +58,6 @@ public class ChanRipperTest extends RippersTest {
|
||||
public String getRandomThreadDesuarchive() {
|
||||
try {
|
||||
Document doc = Http.url(new URL("https://desuarchive.org/wsg/")).get();
|
||||
System.out.println(doc);
|
||||
return doc.select("div.post_data > a").first().attr("href");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
Reference in New Issue
Block a user