接上一个主题,说说还原shortener url之后的url。现在有很多shortener url的网站,比如goo.gl, bit.ly等等,如果只是想知道原始的url,则这个网站不错http://untr.im,这里还有一个小脚本:
#!/bin/bash
#filename: getfullurl.sh
URL=$1
if test "x$URL" == ""; then
exit
fi
curl -q -d "url=$URL" http://untr.im/api/ajax/api | awk -F 'href="' '{print $3}' | awk -F '" rel="' '{print $1}'
运行:
sh getfullurl.sh http://goo.gl/rz2O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
192 170 170 170 0 22 56 7 0:00:03 0:00:03 --:--:-- 81
http://wiki.thc.org/gsm
最好得到 http://wiki.thc.org/gsm
1 条评论:
Did you know you can shorten your long urls with AdFly and receive $$$$$ from every visit to your shortened urls.
发表评论