diff --git a/docs/en/social-media.md b/docs/en/social-media.md index 3d9d669d05..3339d94c4e 100644 --- a/docs/en/social-media.md +++ b/docs/en/social-media.md @@ -126,6 +126,12 @@ Due to Telegram restrictions, some channels involving pornography, copyright, an ## Twitter +::: warning + +Due to Twitter API restrictions, the Twitter Routes currently supports tweets within 7 days + +::: + ### User timeline diff --git a/docs/social-media.md b/docs/social-media.md index ec91977b74..c79a775328 100644 --- a/docs/social-media.md +++ b/docs/social-media.md @@ -396,6 +396,12 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 ## Twitter +::: warning 注意 + +由于 Twitter Api 限制,关于 Twitter 相关的 RSS 接口目前仅支持 7 天内推文检索 + +::: + ### 用户时间线 diff --git a/lib/routes/twitter/keyword.js b/lib/routes/twitter/keyword.js index 51c67cf050..a906b734f9 100644 --- a/lib/routes/twitter/keyword.js +++ b/lib/routes/twitter/keyword.js @@ -7,7 +7,7 @@ module.exports = async (ctx) => { } const keyword = ctx.params.keyword; const result = await utils.getTwit().get('search/tweets', { - q: encodeURIComponent(keyword), + q: keyword, count: 50, tweet_mode: 'extended', result_type: 'recent',