mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-09-02 10:23:47 +02:00
Added support for the other likd url format
This commit is contained in:
@@ -240,7 +240,6 @@ public class TumblrRipper extends AlbumRipper {
|
|||||||
|
|
||||||
if (albumType == ALBUM_TYPE.LIKED) {
|
if (albumType == ALBUM_TYPE.LIKED) {
|
||||||
posts = json.getJSONObject("response").getJSONArray("liked_posts");
|
posts = json.getJSONObject("response").getJSONArray("liked_posts");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
posts = json.getJSONObject("response").getJSONArray("posts");
|
posts = json.getJSONObject("response").getJSONArray("posts");
|
||||||
}
|
}
|
||||||
@@ -380,6 +379,15 @@ public class TumblrRipper extends AlbumRipper {
|
|||||||
return this.subdomain + "_liked";
|
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]");
|
throw new MalformedURLException("Expected format: http://subdomain[.tumblr.com][/tagged/tag|/post/postno]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user