mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-04 23:26:31 +00:00
Add missing error codes for unavailable tweets
This commit is contained in:
parent
aea884c48e
commit
725f601c9b
2 changed files with 3 additions and 1 deletions
|
@ -301,7 +301,7 @@ proc parseGlobalObjects(js: JsonNode): GlobalObjects =
|
|||
|
||||
proc parseStatus*(js: JsonNode): Tweet =
|
||||
with e, js{"errors"}:
|
||||
if e.getError == tweetNotFound:
|
||||
if e.getError in {tweetNotFound, tweetUnavailable, tweetCensored}:
|
||||
return
|
||||
|
||||
result = parseTweet(js, js{"card"})
|
||||
|
|
|
@ -47,6 +47,8 @@ type
|
|||
forbidden = 200
|
||||
badToken = 239
|
||||
noCsrf = 353
|
||||
tweetUnavailable = 421
|
||||
tweetCensored = 422
|
||||
|
||||
User* = object
|
||||
id*: string
|
||||
|
|
Loading…
Reference in a new issue