mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Use legacy timeline/user endpoint for Tweets tab
This commit is contained in:
parent
5725780c99
commit
624394430c
8 changed files with 81 additions and 38 deletions
|
|
@ -44,10 +44,10 @@ proc getPoolJson*(): JsonNode =
|
|||
of Api.search: 100000
|
||||
of Api.photoRail: 180
|
||||
of Api.timeline: 187
|
||||
of Api.userTweets: 300
|
||||
of Api.userTweets, Api.userTimeline: 300
|
||||
of Api.userTweetsAndReplies, Api.userRestId,
|
||||
Api.userScreenName, Api.tweetDetail, Api.tweetResult: 500
|
||||
of Api.list, Api.listTweets, Api.listMembers, Api.listBySlug, Api.userMedia: 500
|
||||
Api.userScreenName, Api.tweetDetail, Api.tweetResult,
|
||||
Api.list, Api.listTweets, Api.listMembers, Api.listBySlug, Api.userMedia: 500
|
||||
of Api.userSearch: 900
|
||||
reqs = maxReqs - token.apis[api].remaining
|
||||
|
||||
|
|
@ -161,6 +161,6 @@ proc initTokenPool*(cfg: Config) {.async.} =
|
|||
enableLogging = cfg.enableDebug
|
||||
|
||||
while true:
|
||||
if tokenPool.countIt(not it.isLimited(Api.timeline)) < cfg.minTokens:
|
||||
if tokenPool.countIt(not it.isLimited(Api.userTimeline)) < cfg.minTokens:
|
||||
await poolTokens(min(4, cfg.minTokens - tokenPool.len))
|
||||
await sleepAsync(2000)
|
||||
|
|
|
|||
Loading…
Reference in a new issue