From e584e64206590fcf3a704e9a7059aa562551dfca Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 9 Nov 2017 01:45:32 -0500 Subject: [PATCH] Added support for imgur /t albums --- .../com/rarchives/ripme/ripper/rippers/ImgurRipper.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 34cbd1ce..4d391839 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java @@ -448,6 +448,15 @@ public class ImgurRipper extends AlbumRipper { this.url = new URL("http://imgur.com/a/" + gid); return gid; } + p = Pattern.compile("^https?://(www\\.|m\\.)?imgur\\.com/(a|gallery|t)/[a-zA-Z0-9]*/([a-zA-Z0-9]{5,}).*$"); + m = p.matcher(url.toExternalForm()); + if (m.matches()) { + // Imgur album or gallery + albumType = ALBUM_TYPE.ALBUM; + String gid = m.group(m.groupCount()); + this.url = new URL("http://imgur.com/a/" + gid); + return gid; + } p = Pattern.compile("^https?://([a-zA-Z0-9\\-]{3,})\\.imgur\\.com/?$"); m = p.matcher(url.toExternalForm()); if (m.matches()) {