Merge pull request #172 from cyian-1756/chanRipperFixes

Fixed chan ripper thread title (For real this time)
This commit is contained in:
cyian-1756 2017-11-12 02:20:25 -05:00 committed by GitHub
commit 690abe848f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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