Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new boolean config twitter.exclude_replies #1991

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class TwitterRipper extends AbstractJSONRipper {

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 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 WAIT_TIME = 2000;

Expand Down Expand Up @@ -121,7 +122,7 @@ private String getApiURL(Long maxID) {
case ACCOUNT:
req.append("https://api.twitter.com/1.1/statuses/user_timeline.json")
.append("?screen_name=" + this.accountName).append("&include_entities=true")
.append("&exclude_replies=true").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");
break;
case SEARCH:// Only get tweets from last week
Expand Down
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
Log = 日志
History = 历史
created = 创建时间
modified = 修改时间
queue = 队列
Configuration = 配置
open = 打开
# Keys for the Configuration menu
current.version = 当前版本
check.for.updates = 检查更新
auto.update = 自动更新?
max.download.threads = 最大下载线程数:
timeout.mill = 超时(毫秒):
retry.download.count = 重试下载次数
overwrite.existing.files = 覆盖现有文件?
sound.when.rip.completes = 抓取完成时播放声音
preserve.order = 保持顺序
save.logs = 保存日志
notification.when.rip.starts = 通知抓取开始
save.urls.only = 仅保存 URL
save.album.titles = 保存专辑标题
autorip.from.clipboard = 监视剪贴板上的 URL
save.descriptions = 保存描述
prefer.mp4.over.gif = 首选 MP4 而非 GIF
restore.window.position = 恢复窗口位置
remember.url.history = 记住 URL 历史
loading.history.from = 加载历史从
# Queue keys
queue.remove.all = 移除全部
queue.validation = 您确定要移除队列内的全部项目?
queue.remove.selected = 移除所选项目
# History
re-rip.checked = 重新抓取选中的项目
remove = 移除
clear = 清除
history.check.all = 选中全部
history.check.none = 取消选中全部
history.check.selected = 选中所选项目
history.uncheck.selected = 取消选中所选项目
history.load.failed.warning = RipMe 加载位于 historyFile.getAbsolutePath() 的历史文件失败\n\n错误:%s\n\n关闭 RipMe 会自动覆盖此文件的内容,\n请在关闭 RipMe 前备份它!
history.load.none = 无可重新抓取的历史条目。请先抓取一些专辑
history.load.none.checked = 未 '选中' 任何历史条目,请通过选中所需 URL 前面的复选框或URL 的右键菜单以选中所需条目
# TrayIcon
tray.show = 显示
tray.hide = 隐藏
tray.autorip = 监视剪贴板上的 URL
tray.exit = 退出
# Misc UI keys
loading.history.from.configuration = 从配置加载历史
interrupted.while.waiting.to.rip.next.album = 等候抓取下一专辑期间发生中断
inactive = 非活动
download.url.list = 下载 URL 列表
select.save.dir = 选择保存目录
# Keys for the logs generated by DownloadFileThread
nonretriable.status.code = 非可重试状态代码
retriable.status.code = 可重试状态代码
server.doesnt.support.resuming.downloads = 服务器不支持继续下载(续传)
# A "magic number" can also be called a file signature
was.unable.to.get.content.type.using.magic.number = 不能使用幻数获取内容类型
magic.number.was = 幻数为
deleting.existing.file = 删除现有文件
request.properties = 请求属性
download.interrupted = 下载中断
exceeded.maximum.retries = 超过最大重试次数
http.status.exception = HTTP 状态意外
exception.while.downloading.file = 下载文件时发生意外
failed.to.download = 下载失败
skipping = 跳过
Log = 日志
History = 历史
created = 创建时间
modified = 修改时间
queue = 队列
Configuration = 配置
open = 打开

# Keys for the Configuration menu
current.version = 当前版本
check.for.updates = 检查更新
auto.update = 自动更新?
max.download.threads = 最大下载线程数:
timeout.mill = 超时(毫秒):
retry.download.count = 重试下载次数
overwrite.existing.files = 覆盖现有文件?
sound.when.rip.completes = 抓取完成时播放声音
preserve.order = 保持顺序
save.logs = 保存日志
notification.when.rip.starts = 通知抓取开始
save.urls.only = 仅保存 URL
save.album.titles = 保存专辑标题
autorip.from.clipboard = 监视剪贴板上的 URL
save.descriptions = 保存描述
prefer.mp4.over.gif = 首选 MP4 而非 GIF
restore.window.position = 恢复窗口位置
remember.url.history = 记住 URL 历史
loading.history.from = 加载历史从

# Queue keys
queue.remove.all = 移除全部
queue.validation = 您确定要移除队列内的全部项目?
queue.remove.selected = 移除所选项目

# History
re-rip.checked = 重新抓取选中的项目
remove = 移除
clear = 清除
history.check.all = 选中全部
history.check.none = 取消选中全部
history.check.selected = 选中所选项目
history.uncheck.selected = 取消选中所选项目
history.load.failed.warning = RipMe 加载位于 historyFile.getAbsolutePath() 的历史文件失败\n\n错误:%s\n\n关闭 RipMe 会自动覆盖此文件的内容,\n请在关闭 RipMe 前备份它!
history.load.none = 无可重新抓取的历史条目。请先抓取一些专辑
history.load.none.checked = 未 '选中' 任何历史条目,请通过选中所需 URL 前面的复选框或URL 的右键菜单以选中所需条目

# TrayIcon
tray.show = 显示
tray.hide = 隐藏
tray.autorip = 监视剪贴板上的 URL
tray.exit = 退出

# Misc UI keys
loading.history.from.configuration = 从配置加载历史
interrupted.while.waiting.to.rip.next.album = 等候抓取下一专辑期间发生中断
inactive = 非活动
download.url.list = 下载 URL 列表
select.save.dir = 选择保存目录

# Keys for the logs generated by DownloadFileThread
nonretriable.status.code = 非可重试状态代码
retriable.status.code = 可重试状态代码
server.doesnt.support.resuming.downloads = 服务器不支持继续下载(续传)
# A "magic number" can also be called a file signature
was.unable.to.get.content.type.using.magic.number = 不能使用幻数获取内容类型
magic.number.was = 幻数为
deleting.existing.file = 删除现有文件
request.properties = 请求属性
download.interrupted = 下载中断
exceeded.maximum.retries = 超过最大重试次数
http.status.exception = HTTP 状态意外
exception.while.downloading.file = 下载文件时发生意外
failed.to.download = 下载失败
skipping = 跳过
file.already.exists = 文件已存在
1 change: 1 addition & 0 deletions src/main/resources/rip.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ gw.api = gonewild

twitter.max_requests = 10
twitter.rip_retweets = false
twitter.exclude_replies = true

clipboard.autorip = false

Expand Down