1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-29 08:40:37 +02:00

Added support for the other likd url format

This commit is contained in:
cyian-1756
2018-12-04 20:48:13 -05:00
parent f81ddb8b3d
commit f01cd07496

View File

@@ -240,7 +240,6 @@ public class TumblrRipper extends AlbumRipper {
if (albumType == ALBUM_TYPE.LIKED) {
posts = json.getJSONObject("response").getJSONArray("liked_posts");
} else {
posts = json.getJSONObject("response").getJSONArray("posts");
}
@@ -380,6 +379,15 @@ public class TumblrRipper extends AlbumRipper {
return this.subdomain + "_liked";
}
// Likes url different format
p = Pattern.compile("https://www.tumblr.com/liked/by/([a-z0-9_-]+)");
m = p.matcher(url.toExternalForm());
if (m.matches()) {
this.albumType = ALBUM_TYPE.LIKED;
this.subdomain = m.group(1);
return this.subdomain + "_liked";
}
throw new MalformedURLException("Expected format: http://subdomain[.tumblr.com][/tagged/tag|/post/postno]");
}