- https://github.com/fa0311/TwitterFrontendFlow
-
Unofficial Client for Twitter Internal API
-
- https://github.com/fa0311/twitter-openapi-typescript
-
Implementation of Twitter internal API (Twitter graphql API) in TypeScript
-
- https://github.com/fa0311/twitter-openapi
-
OpenAPI(Swagger) specification of Twitter Internal API (Twitter graphql API)
-
- https://github.com/fa0311/TwitterInternalAPIDocument
-
Reverse engineering of the web version of Twitter.
-
- https://github.com/prinsss/twitter-web-exporter
-
Export tweets, bookmarks, lists and much more from Twitter(X) web app.
- https://greasyfork.org/en/scripts/492218-twitter-web-exporter
-
On Twitter, from my notifications page:
When I click on the 'New post notifications for...' section, I am taken to a new page:
As part of this page, an API call is made to fetch the tweets to be shown:
This returns JSON data, from which we can extract the Tweets, and sort them by post time with something like jq
:
pbpaste | jq '.globalObjects.tweets | to_entries | sort_by(.value.created_at | strptime("%a %b %d %H:%M:%S %z %Y")) | reverse | from_entries' | subl
This data will then look something like this:
{
"1734010714510049396": {
"created_at": "Mon Dec 11 00:42:25 +0000 2023",
"id": 1734010714510049300,
"id_str": "1734010714510049396",
"full_text": "Don’t be S-A-D! https://t.co/fkHsvfwuGG",
"truncated": false,
"display_text_range": [
0,
15
],
"entities": { /* ..snip.. */ },
"extended_entities": { /* ..snip.. */ },
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user_id": 44196397,
"user_id_str": "44196397",
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 5203,
"favorite_count": 56940,
"reply_count": 3883,
"quote_count": 410,
"conversation_id": 1734010714510049300,
"conversation_id_str": "1734010714510049396",
"conversation_muted": false,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en",
"ext": {
"superFollowMetadata": {
"r": {
"ok": {}
},
"ttl": -1
}
}
},
// ..snip..
}
From that info (and matching against the DOM itself), it should be possible to implement a userscript/similar that can:
- mark where the last tweet I saw was (both automatically, and manually)
- hide/dim tweets older than that
- tell me how many tweets there are till I am 'caught up'
- etc