mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-26 23:34:53 +02:00
Merge pull request #1248 from Tush-r/twitter
Added support for optional retweet downloads.
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");
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@ tumblr.auth = JFNLu3CbINQjRdUvZibXW9VpSEVYYtiPJ86o8YmvgLZIoKyuNX
|
|||||||
gw.api = gonewild
|
gw.api = gonewild
|
||||||
|
|
||||||
twitter.max_requests = 10
|
twitter.max_requests = 10
|
||||||
|
twitter.rip_retweets = false
|
||||||
|
|
||||||
clipboard.autorip = false
|
clipboard.autorip = false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user