From 2de9d58cca93b67ef1ab33fbbf70b4762c2b7399 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sat, 11 Nov 2017 01:56:36 -0500 Subject: [PATCH] Fixed chan ripper thread title (For real this time) --- .../java/com/rarchives/ripme/ripper/rippers/ChanRipper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java index 06b8c68e..d986d655 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java @@ -64,9 +64,11 @@ public class ChanRipper extends AbstractHTMLRipper { try { // Attempt to use album title as GID Document doc = getFirstPage(); - String subject = doc.select(".post.op > .postinfo > .subject").first().text(); - if (subject != null) { + try { + String subject = doc.select(".post.op > .postinfo > .subject").first().text(); return getHost() + "_" + getGID(url) + "_" + subject; + } catch (NullPointerException e) { + logger.warn("Failed to get thread title from " + url); } return doc.select("title").first().text(); } catch (Exception e) {