mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-22 18:45:31 +00:00
Add proper tombstone for subscriber tweets
This commit is contained in:
parent
b516ec367b
commit
e3b3b38a2d
|
@ -11,13 +11,13 @@ const
|
||||||
userSearch* = api / "1.1/users/search.json"
|
userSearch* = api / "1.1/users/search.json"
|
||||||
|
|
||||||
graphql = api / "graphql"
|
graphql = api / "graphql"
|
||||||
graphUser* = graphql / "8mPfHBetXOg-EHAyeVxUoA/UserByScreenName"
|
graphUser* = graphql / "pVrmNaXcxPjisIvKtLDMEA/UserByScreenName"
|
||||||
graphUserById* = graphql / "nI8WydSd-X-lQIVo6bdktQ/UserByRestId"
|
graphUserById* = graphql / "1YAM811Q8Ry4XyPpJclURQ/UserByRestId"
|
||||||
graphUserTweets* = graphql / "9rys0A7w1EyqVd2ME0QCJg/UserTweets"
|
graphUserTweets* = graphql / "WzJjibAcDa-oCjCcLOotcg/UserTweets"
|
||||||
graphUserTweetsAndReplies* = graphql / "ehMCHF3Mkgjsfz_aImqOsg/UserTweetsAndReplies"
|
graphUserTweetsAndReplies* = graphql / "fn9oRltM1N4thkh5CVusPg/UserTweetsAndReplies"
|
||||||
graphUserMedia* = graphql / "MA_EP2a21zpzNWKRkaPBMg/UserMedia"
|
graphUserMedia* = graphql / "qQoeS7szGavsi8-ehD2AWg/UserMedia"
|
||||||
graphTweet* = graphql / "6I7Hm635Q6ftv69L8VrSeQ/TweetDetail"
|
graphTweet* = graphql / "miKSMGb2R1SewIJv2-ablQ/TweetDetail"
|
||||||
graphTweetResult* = graphql / "rt-rHeSJ-2H9O9gxWQcPcg/TweetResultByRestId"
|
graphTweetResult* = graphql / "0kc0a_7TTr3dvweZlMslsQ/TweetResultByRestId"
|
||||||
graphSearchTimeline* = graphql / "gkjsKepM6gl_HmFWoWKfgg/SearchTimeline"
|
graphSearchTimeline* = graphql / "gkjsKepM6gl_HmFWoWKfgg/SearchTimeline"
|
||||||
graphListById* = graphql / "iTpgCtbdxrsJfyx0cFjHqg/ListByRestId"
|
graphListById* = graphql / "iTpgCtbdxrsJfyx0cFjHqg/ListByRestId"
|
||||||
graphListBySlug* = graphql / "-kmqNvm5Y-cVrfvBy6docg/ListBySlug"
|
graphListBySlug* = graphql / "-kmqNvm5Y-cVrfvBy6docg/ListBySlug"
|
||||||
|
@ -50,10 +50,13 @@ const
|
||||||
|
|
||||||
gqlFeatures* = """{
|
gqlFeatures* = """{
|
||||||
"blue_business_profile_image_shape_enabled": false,
|
"blue_business_profile_image_shape_enabled": false,
|
||||||
|
"creator_subscriptions_tweet_preview_api_enabled": true,
|
||||||
"freedom_of_speech_not_reach_fetch_enabled": false,
|
"freedom_of_speech_not_reach_fetch_enabled": false,
|
||||||
"graphql_is_translatable_rweb_tweet_is_translatable_enabled": false,
|
"graphql_is_translatable_rweb_tweet_is_translatable_enabled": false,
|
||||||
|
"highlights_tweets_tab_ui_enabled": false,
|
||||||
"interactive_text_enabled": false,
|
"interactive_text_enabled": false,
|
||||||
"longform_notetweets_consumption_enabled": true,
|
"longform_notetweets_consumption_enabled": true,
|
||||||
|
"longform_notetweets_inline_media_enabled": false,
|
||||||
"longform_notetweets_richtext_consumption_enabled": true,
|
"longform_notetweets_richtext_consumption_enabled": true,
|
||||||
"longform_notetweets_rich_text_read_enabled": false,
|
"longform_notetweets_rich_text_read_enabled": false,
|
||||||
"responsive_web_edit_tweet_api_enabled": false,
|
"responsive_web_edit_tweet_api_enabled": false,
|
||||||
|
@ -63,6 +66,7 @@ const
|
||||||
"responsive_web_graphql_timeline_navigation_enabled": false,
|
"responsive_web_graphql_timeline_navigation_enabled": false,
|
||||||
"responsive_web_text_conversations_enabled": false,
|
"responsive_web_text_conversations_enabled": false,
|
||||||
"responsive_web_twitter_blue_verified_badge_is_enabled": true,
|
"responsive_web_twitter_blue_verified_badge_is_enabled": true,
|
||||||
|
"rweb_lists_timeline_redesign_enabled": true,
|
||||||
"spaces_2022_h2_clipping": true,
|
"spaces_2022_h2_clipping": true,
|
||||||
"spaces_2022_h2_spaces_communities": true,
|
"spaces_2022_h2_spaces_communities": true,
|
||||||
"standardized_nudges_misinfo": false,
|
"standardized_nudges_misinfo": false,
|
||||||
|
|
|
@ -381,16 +381,15 @@ proc parsePhotoRail*(js: JsonNode): PhotoRail =
|
||||||
|
|
||||||
proc parseGraphTweet(js: JsonNode): Tweet =
|
proc parseGraphTweet(js: JsonNode): Tweet =
|
||||||
if js.kind == JNull:
|
if js.kind == JNull:
|
||||||
return Tweet(available: false)
|
return Tweet()
|
||||||
|
|
||||||
case js{"__typename"}.getStr
|
case js{"__typename"}.getStr
|
||||||
of "TweetUnavailable", "TweetPreviewDisplay":
|
of "TweetUnavailable":
|
||||||
return Tweet(available: false)
|
return Tweet()
|
||||||
of "TweetTombstone":
|
of "TweetTombstone":
|
||||||
return Tweet(
|
return Tweet(text: js{"tombstone", "text"}.getTombstone)
|
||||||
available: false,
|
of "TweetPreviewDisplay":
|
||||||
text: js{"tombstone", "text"}.getTombstone
|
return Tweet(text: "You're unable to view this Tweet because it's only available to the Subscribers of the account owner.")
|
||||||
)
|
|
||||||
of "TweetWithVisibilityResults":
|
of "TweetWithVisibilityResults":
|
||||||
return parseGraphTweet(js{"tweet"})
|
return parseGraphTweet(js{"tweet"})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue