1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-18 05:08:15 +01:00

Fixed chan ripper thread title (For real this time)

This commit is contained in:
cyian-1756 2017-11-11 01:56:36 -05:00
parent 84cf9b1fc5
commit 2de9d58cca

View File

@ -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) {