1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 23:34:53 +02:00

Merge pull request #1156 from cyian-1756/reduce-log-spam

Reduce log spam
This commit is contained in:
cyian-1756
2019-01-09 16:10:01 -05:00
committed by GitHub
7 changed files with 0 additions and 8 deletions

View File

@@ -113,7 +113,6 @@ public class BatoRipper extends AbstractHTMLRipper {
s = s.replaceAll("var prevCha = null;", ""); s = s.replaceAll("var prevCha = null;", "");
s = s.replaceAll("var nextCha = \\.*;", ""); s = s.replaceAll("var nextCha = \\.*;", "");
String json = s.replaceAll("var images = ", "").replaceAll(";", ""); String json = s.replaceAll("var images = ", "").replaceAll(";", "");
LOGGER.info(s);
JSONObject images = new JSONObject(json); JSONObject images = new JSONObject(json);
for (int i = 1; i < images.length() +1; i++) { for (int i = 1; i < images.length() +1; i++) {
result.add(images.getString(Integer.toString(i))); result.add(images.getString(Integer.toString(i)));

View File

@@ -111,7 +111,6 @@ public class ChanRipper extends AbstractHTMLRipper {
String u = url.toExternalForm(); String u = url.toExternalForm();
if (u.contains("/thread/") || u.contains("/res/") || u.contains("yuki.la") || u.contains("55chan.org")) { 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)?.*$"); p = Pattern.compile("^.*\\.[a-z]{1,3}/[a-zA-Z0-9]+/(thread|res)/([0-9]+)(\\.html|\\.php)?.*$");
m = p.matcher(u); m = p.matcher(u);
if (m.matches()) { if (m.matches()) {

View File

@@ -213,7 +213,6 @@ public class DeviantartRipper extends AbstractJSONRipper {
if (js.html().contains("requestid")) { if (js.html().contains("requestid")) {
String json = js.html().replaceAll("window.__initial_body_data=", "").replaceAll("\\);", "") String json = js.html().replaceAll("window.__initial_body_data=", "").replaceAll("\\);", "")
.replaceAll(";__wake\\(.+", ""); .replaceAll(";__wake\\(.+", "");
LOGGER.info("json: " + json);
JSONObject j = new JSONObject(json); JSONObject j = new JSONObject(json);
return j; return j;
} }
@@ -253,7 +252,6 @@ public class DeviantartRipper extends AbstractJSONRipper {
@Override @Override
public List<String> getURLsFromJSON(JSONObject json) { public List<String> getURLsFromJSON(JSONObject json) {
List<String> imageURLs = new ArrayList<>(); List<String> imageURLs = new ArrayList<>();
LOGGER.info(json);
JSONArray results = json.getJSONObject("content").getJSONArray("results"); JSONArray results = json.getJSONObject("content").getJSONArray("results");
for (int i = 0; i < results.length(); i++) { for (int i = 0; i < results.length(); i++) {
Document doc = Jsoup.parseBodyFragment(results.getJSONObject(i).getString("html")); Document doc = Jsoup.parseBodyFragment(results.getJSONObject(i).getString("html"));

View File

@@ -78,7 +78,6 @@ public class FuraffinityRipper extends AbstractHTMLRipper {
@Override @Override
public Document getFirstPage() throws IOException { public Document getFirstPage() throws IOException {
setCookies(); setCookies();
LOGGER.info(Http.url(url).cookies(cookies).get().html());
return Http.url(url).cookies(cookies).get(); return Http.url(url).cookies(cookies).get();
} }

View File

@@ -56,7 +56,6 @@ public class HitomiRipper extends AbstractHTMLRipper {
public List<String> getURLsFromPage(Document doc) { public List<String> getURLsFromPage(Document doc) {
List<String> result = new ArrayList<>(); List<String> result = new ArrayList<>();
String json = doc.text().replaceAll("var galleryinfo =", ""); String json = doc.text().replaceAll("var galleryinfo =", "");
LOGGER.info(json);
JSONArray json_data = new JSONArray(json); JSONArray json_data = new JSONArray(json);
for (int i = 0; i < json_data.length(); i++) { for (int i = 0; i < json_data.length(); i++) {
result.add("https://ba.hitomi.la/galleries/" + galleryId + "/" + json_data.getJSONObject(i).getString("name")); result.add("https://ba.hitomi.la/galleries/" + galleryId + "/" + json_data.getJSONObject(i).getString("name"));

View File

@@ -79,7 +79,6 @@ public class ZizkiRipper extends AbstractHTMLRipper {
// Page contains images // Page contains images
LOGGER.info("Look for images."); LOGGER.info("Look for images.");
for (Element thumb : page.select("img")) { for (Element thumb : page.select("img")) {
LOGGER.info("Img");
if (super.isStopped()) break; if (super.isStopped()) break;
// Find thumbnail image source // Find thumbnail image source
String image = null; String image = null;

View File

@@ -58,7 +58,6 @@ public class ChanRipperTest extends RippersTest {
public String getRandomThreadDesuarchive() { public String getRandomThreadDesuarchive() {
try { try {
Document doc = Http.url(new URL("https://desuarchive.org/wsg/")).get(); 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"); return doc.select("div.post_data > a").first().attr("href");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();