Ripper now falls back to getHost() and getGID(), not page title

This commit is contained in:
cyian-1756 2017-11-14 13:22:20 -05:00
parent c94de79c46
commit 4016f35ab4

View File

@ -70,12 +70,12 @@ public class ChanRipper extends AbstractHTMLRipper {
} catch (NullPointerException e) { } catch (NullPointerException e) {
logger.warn("Failed to get thread title from " + url); logger.warn("Failed to get thread title from " + url);
} }
return doc.select("title").first().text();
} catch (Exception e) { } catch (Exception e) {
// Fall back to default album naming convention // Fall back to default album naming convention
logger.warn("Failed to get album title from " + url, e); logger.warn("Failed to get album title from " + url, e);
} }
return super.getAlbumTitle(url); // Fall back on the GID
return getHost() + "_" + getGID(url);
} }
@Override @Override
@ -211,6 +211,6 @@ public class ChanRipper extends AbstractHTMLRipper {
@Override @Override
public void downloadURL(URL url, int index) { public void downloadURL(URL url, int index) {
addURLToDownload(url, getPrefix(index), "", this.url.toString(), null); addURLToDownload(url, getPrefix(index));
} }
} }