1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-07-31 02:50:15 +02:00

Merge pull request #157 from RipMeApp/imgur_t_albums

Added support for imgur /t albums
This commit is contained in:
cyian-1756
2017-11-10 03:45:32 -05:00
committed by GitHub

View File

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