From c0025a3b29db9c2fd1ed8b1fb792f72f2207b71c Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 14 Dec 2017 22:38:22 -0500 Subject: [PATCH] Fixed imgur album filenames --- .../com/rarchives/ripme/ripper/rippers/ImgurRipper.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java index 4d391839..7c271442 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java @@ -105,7 +105,8 @@ public class ImgurRipper extends AlbumRipper { */ String title = null; - final String defaultTitle = "Imgur: The most awesome images on the Internet"; + final String defaultTitle1 = "Imgur: The most awesome images on the Internet"; + final String defaultTitle2 = "Imgur: The magic of the Internet"; logger.info("Trying to get album title"); elems = albumDoc.select("meta[property=og:title]"); if (elems != null) { @@ -114,7 +115,7 @@ public class ImgurRipper extends AlbumRipper { } // This is here encase the album is unnamed, to prevent // Imgur: The most awesome images on the Internet from being added onto the album name - if (title.contains(defaultTitle)) { + if (title.contains(defaultTitle1) || title.contains(defaultTitle2)) { logger.debug("Album is untitled or imgur is returning the default title"); // We set the title to "" here because if it's found in the next few attempts it will be changed // but if it's nto found there will be no reason to set it later @@ -122,7 +123,7 @@ public class ImgurRipper extends AlbumRipper { logger.debug("Trying to use title tag to get title"); elems = albumDoc.select("title"); if (elems != null) { - if (elems.text().contains(defaultTitle)) { + if (elems.text().contains(defaultTitle1) || elems.text().contains(defaultTitle2)) { logger.debug("Was unable to get album title or album was untitled"); } else {