3 ms·
Is it possible to make such a thing working if using command-line programs such as curl or wget to download a file rather than opening it in the web browser?
by zzo38computer 7y ago
Is it possible to make such a thing working if using command-line programs such as curl or wget to download a file rather than opening it in the web browser?
- l1am0 7y agoIt should totaly be possible. Same as with the DNS solution you can get the data via the api of unshort.link and than build a small bash script for it. If I have time I may try to do such a script, but not sure if and when I will be able to make it. Would be awesome if you build something like that! You can get the currently to unshort.link known short link providers in a nice json format from https://unshort.link/providers https://unshort.link/providers You can get the redirect info from unshort link also via its api without redirecting, just replace /d/ with /api/ in the GET request: e.g. https://unshort.link/api/https://tinyurl.com/unshortchromeex.. https://unshort.link/api/https://tinyurl.com/unshortchromeex.... If you build a solution, please do not forget to add the documentation on how to do it via a pull request to the unshort.link repo, so everyone could profit from it
- moehm 7y agoThis is what I use which also removes utm_* tracking parameters. getloc () { curl -sI "$1" | grep -i "Location" | awk '/http.*/{print $2}' | sed 's/[%+]*//g' | sed 's/&*utm_[a-zA-Z0-9]*=[a-zA-Z0-9]*//g' | sed 's/?\s*$//g' }