1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-16 20:28:15 +01:00

CoomerPartyRipper.java - can be a slow site for large downloads anyway; rate limit ourselves to avoid getting rate-limited

This commit is contained in:
MetaPrime 2025-01-06 01:52:32 -08:00
parent d736938140
commit 0fa61c0b65

View File

@ -42,11 +42,11 @@ public class CoomerPartyRipper extends AbstractJSONRipper {
// Pagination is strictly 50 posts per page, per API schema.
private Integer pageCount = 0;
private static final Integer postCount = 50;
private static final Integer postCount = 50;
// "Service" of the page to be ripped: Onlyfans, Fansly, Candfans
private final String service;
// Username of the page to be ripped
private final String user;
@ -91,7 +91,7 @@ public class CoomerPartyRipper extends AbstractJSONRipper {
private JSONObject getJsonPostsForOffset(Integer offset) throws IOException {
String apiUrl = String.format(POSTS_ENDPOINT, service, user, offset);
String jsonArrayString = Http.url(apiUrl)
.ignoreContentType()
.response()
@ -133,6 +133,7 @@ public class CoomerPartyRipper extends AbstractJSONRipper {
@Override
protected void downloadURL(URL url, int index) {
sleep(5000);
addURLToDownload(url, getPrefix(index));
}