by lucb1e · 6y ago · 0 comments
xclip -out -selection clipboard | while read word; do <the curl command>; done
Then you can probably do the whole list at once.
There is probably also a javascript way to automate this, but if they do it with ajax, this might be faster. Since I do this sort of automation regularly, I aliased the clipboard pasting to "c-v"[1] and so it's quite easy for me to do this sort of thing quickly without having to remember the exact flags and type all of that.
[1] .bashrc addition: alias c-v='xclip -out -selection clipboard'
Also, if the JS way would use AJAX, it would take the exact same time to perform the requests via the browser, as it would with curl, unless there is some particular quirk with their server/setup/deployment/god, or if you have a computer that doesn't run Twitter (the client side application) so good (bottleneck in cpu/ram rather than network speed)
Yes. When you use "copy as curl" a request, it copies the actual request as a curl command, including any headers (bearer token / cookie / whatever).