pull down to refresh

% curl -v -L https://share.google/8hSs8QPq0lF8hsomi 2>&1 |grep -i "\(^> GET\)\|\(^> Host:\)\|\(^< HTTP\)\|\(^< location\)"
> GET /8hSs8QPq0lF8hsomi HTTP/2
> Host: share.google
< HTTP/2 302 
< location: https://www.google.com/share.google?q=8hSs8QPq0lF8hsomi
> GET /share.google?q=8hSs8QPq0lF8hsomi HTTP/2
> Host: www.google.com
< HTTP/2 301 
< location: https://www.earth.com/news/astronomers-detect-a-new-class-of-intermediate-black-holes/
> GET /news/astronomers-detect-a-new-class-of-intermediate-black-holes/ HTTP/2
> Host: www.earth.com
< HTTP/2 301 
< location: https://www.earth.com/news/evidence-found-suggesting-new-space-objects-called-intermediate-mass-black-holes/
> GET /news/evidence-found-suggesting-new-space-objects-called-intermediate-mass-black-holes/ HTTP/2
> Host: www.earth.com

So I guess I'll be doing:

curl --proxy socks5h://127.0.0.1:9050 \
     -s -L -I -X GET \
     https://share.google/8hSs8QPq0lF8hsomi \
| grep location: \
| tail -n 1 \
| sed 's/^location: //'

To fix y'alls spooky links.

100 sats \ 1 reply \ @k00b 6 Jan

We unwind links that have HTTP redirects, but these do not

reply

The second redirect (from www.google.com/share.google?q=) only appears on GET, and not on HEAD.

reply