mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-01 03:20:20 +02:00
Added new boolean config twitter.exclude_replies (Merges #1991)
This commit is contained in:
@@ -28,6 +28,7 @@ public class TwitterRipper extends AbstractJSONRipper {
|
|||||||
|
|
||||||
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 boolean RIP_RETWEETS = Utils.getConfigBoolean("twitter.rip_retweets", true);
|
||||||
|
private static final boolean EXCLUDE_REPLIES = Utils.getConfigBoolean("twitter.exclude_replies", true);
|
||||||
private static final int MAX_ITEMS_REQUEST = Utils.getConfigInteger("twitter.max_items_request", 200);
|
private static final int MAX_ITEMS_REQUEST = Utils.getConfigInteger("twitter.max_items_request", 200);
|
||||||
private static final int WAIT_TIME = 2000;
|
private static final int WAIT_TIME = 2000;
|
||||||
|
|
||||||
@@ -125,7 +126,7 @@ public class TwitterRipper extends AbstractJSONRipper {
|
|||||||
case ACCOUNT:
|
case ACCOUNT:
|
||||||
req.append("https://api.twitter.com/1.1/statuses/user_timeline.json")
|
req.append("https://api.twitter.com/1.1/statuses/user_timeline.json")
|
||||||
.append("?screen_name=" + this.accountName).append("&include_entities=true")
|
.append("?screen_name=" + this.accountName).append("&include_entities=true")
|
||||||
.append("&exclude_replies=false").append("&trim_user=true").append("&count=" + MAX_ITEMS_REQUEST)
|
.append("&exclude_replies=" + EXCLUDE_REPLIES).append("&trim_user=true").append("&count=" + MAX_ITEMS_REQUEST)
|
||||||
.append("&tweet_mode=extended");
|
.append("&tweet_mode=extended");
|
||||||
break;
|
break;
|
||||||
case SEARCH:// Only get tweets from last week
|
case SEARCH:// Only get tweets from last week
|
||||||
|
@@ -30,6 +30,7 @@ gw.api = gonewild
|
|||||||
|
|
||||||
twitter.max_requests = 10
|
twitter.max_requests = 10
|
||||||
twitter.rip_retweets = false
|
twitter.rip_retweets = false
|
||||||
|
twitter.exclude_replies = true
|
||||||
|
|
||||||
clipboard.autorip = false
|
clipboard.autorip = false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user