mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
parent
206622ea38
commit
0ac9bc2678
3 changed files with 29 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ proc getGraphUser*(username: string): Future[User] {.async.} =
|
|||
proc getGraphUserById*(id: string): Future[User] {.async.} =
|
||||
if id.len == 0 or id.any(c => not c.isDigit): return
|
||||
let
|
||||
url = apiReq(graphUserById, """{"rest_id": "$1"}""" % id)
|
||||
url = apiReq(graphUserById, userByRestIdVars % id)
|
||||
js = await fetchRaw(url)
|
||||
result = parseGraphUser(js)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const
|
|||
|
||||
graphUser* = "IGgvgiOx4QZndDHuD3x9TQ/UserByScreenName"
|
||||
graphUserV2* = "-ZzAG_Bckx16LMbEvHC3lg/UserResultByScreenNameQuery"
|
||||
graphUserById* = "-DAaa9jPxPswYeI2fZ9rug/UserResultByIdQuery"
|
||||
graphUserById* = "xvmVfRLmnr1alc5f2dib0Q/UserByRestId"
|
||||
graphUserTweetsV2* = "LE3eTyeqhBh2g-fX85O2eQ/UserWithProfileTweetsQueryV2"
|
||||
graphUserTweetsAndRepliesV2* = "AcYHjc_YAx-9_rKWdMsKvA/UserWithProfileTweetsAndRepliesQueryV2"
|
||||
graphUserTweets* = "PNd0vlufvrcIwrAnBYKE9g/UserTweets"
|
||||
|
|
@ -174,6 +174,11 @@ const
|
|||
"withCommunity": false
|
||||
}""".replace(" ", "").replace("\n", "")
|
||||
|
||||
userByRestIdVars* = """{
|
||||
"userId": "$1",
|
||||
"withSafetyModeUserFields": true
|
||||
}""".replace(" ", "").replace("\n", "")
|
||||
|
||||
communityTweetsVars* = """{
|
||||
"communityId": "$1", $2
|
||||
"count": 20,
|
||||
|
|
|
|||
Loading…
Reference in a new issue