twitter4j 是否提供在 2 个日期之间搜索推文的功能 [英] Does twitter4j provide the capability to search tweets between 2 dates
本文介绍了twitter4j 是否提供在 2 个日期之间搜索推文的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
twitter4j 是否提供在 2 个日期之间搜索推文的功能(例如 2011-10-27 05:30:00 到 2011-10-27 06:30:00)
Does twitter4j provide the capability to search tweets between 2 dates (e.g. 2011-10-27 05:30:00 to 2011-10-27 06:30:00)
目前它似乎具有日期的粒度,而不是小时或分钟.
currently it seems to have the granularity of a date and not hours or minutes.
推荐答案
没有,在当前版本中没有办法指定日期&在给定范围内搜索的时间.
No, at the current version there is no way to specify date & time for searching within given range.
这就是 Twitter 搜索 API 的限制:
- 不支持否定 (-) 运算符.
- 应以年-月-日或 yyyy-mm-dd 格式输入列表项.
- 假定是从/到 00:00 UTC.
- 不能设置为未来.如果直到将来,您将收到 HTTP 403 错误消息:
{"error":"You cannot use an 'until:' date in the future"}
.如果因为在将来,您将收到一个 HTTP 403 错误消息:{"error":"since_id too recent, poll less frequency"}
Notes about Search Operators
since and until
- do not support the negation (-) operator.
- List item should be entered in the format year-month-day or yyyy-mm-dd.
- are assumed to be from/to 00:00 UTC.
- cannot be set into the future. If until is in the future you will receive an HTTP 403 error with the message:
{"error":"You cannot use an 'until:' date in the future"}
. If since is in the future you will receive an HTTP 403 error with the message:{"error":"since_id too recent, poll less frequently"}
这篇关于twitter4j 是否提供在 2 个日期之间搜索推文的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文