mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-26 15:24:51 +02:00
Ripping retweets is now based on twitter.rip_retweets value.
This commit is contained in:
@@ -26,6 +26,7 @@ public class TwitterRipper extends AlbumRipper {
|
|||||||
HOST = "twitter";
|
HOST = "twitter";
|
||||||
|
|
||||||
private static final int MAX_REQUESTS = Utils.getConfigInteger("twitter.max_requests", 10);
|
private static final int MAX_REQUESTS = Utils.getConfigInteger("twitter.max_requests", 10);
|
||||||
|
private static final boolean RIP_RETWEETS = Utils.getConfigBoolean("twitter.rip_retweets", true);
|
||||||
private static final int WAIT_TIME = 2000;
|
private static final int WAIT_TIME = 2000;
|
||||||
|
|
||||||
// Base 64 of consumer key : consumer secret
|
// Base 64 of consumer key : consumer secret
|
||||||
@@ -177,6 +178,11 @@ public class TwitterRipper extends AlbumRipper {
|
|||||||
LOGGER.error("XXX Tweet doesn't have entitites");
|
LOGGER.error("XXX Tweet doesn't have entitites");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!RIP_RETWEETS && tweet.has("retweeted_status")) {
|
||||||
|
LOGGER.info("Skipping a retweet as twitter.rip_retweet is set to false.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject entities = tweet.getJSONObject("extended_entities");
|
JSONObject entities = tweet.getJSONObject("extended_entities");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user