mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-21 03:39:54 +00:00
30 lines
1,008 B
Text
30 lines
1,008 B
Text
https://nitter.net/search?f=tweets&q=%23100binaries+from%3A%40wezm
|
|
|
|
For each page of results on Nitter:
|
|
|
|
tweets = []
|
|
document.querySelectorAll('.tweet-date a').forEach(a => tweets.push(a.href))
|
|
copy(tweets.join("\n"))
|
|
|
|
// Load next page of results and repeat
|
|
|
|
Paste into `tweets.txt`
|
|
|
|
With all URLs collected, `:s/nitter\.net/twitter.com/`
|
|
|
|
Fetch tweets JSON:
|
|
|
|
xargs -I '{url}' -a tweets.txt -n 1 curl https://api.twitter.com/1/statuses/oembed.json\?omit_script\=true\&dnt\=true\&lang\=en\&url\=\{url\} > tweets.json
|
|
|
|
Add commas between results: `%s/}{/},\r{/g`
|
|
|
|
Manually add `[` and `]` to top and bottom of file
|
|
|
|
Reverse and format with `jq`: `%!jq '.|reverse' -`. Would have been better to
|
|
have reversed `tweets.txt` but this avoids making another 100 HTTP requests.
|
|
|
|
Add a couple of missing tweets manually. Remove the half way through tweet.
|
|
|
|
Expand t.co links with a little [Rust tool I wrote specifically for this][expand-t-co].
|
|
|
|
[expand-t-co]: https://github.com/wezm/expand-t-co
|