Hacker Newsnew | comments | show | ask | jobs | submit login
Ask HN: Review a simple URL un-shortening service. (unshort.me)
15 points by clear 2320 days ago | 20 comments



I'm at a loss to understand why someone needs an API to unshorten a url. Can they not just unshorten it themselves?

What's next? A webservice API for doing DNS lookups?

-----


I can see several reasons for this:

1 - Build a database of short to unshortened URLs as a backup in case that one of the shortening services goes under.

2 - Such a service can be useful for anyone who wants to know where the URL points to without clicking it (or without the skills to unshorten it themselves).

3 - It could allow for batch unshortening

4 - A database can still unshorten URLs that no longer exist etc..

-----


> for [anyone] without the skills to unshorten it themselves

I think I'm one, because I don't know of any way to unshorten these tiny URLs without visiting them or using some such service.

If you know of one, could you enlighten me? Thanks...

-----


It's really not hard. For example, on the command line:

     $ curl -I http://tinyurl.com/9a4xj6
     HTTP/1.1 301 Moved Permanently
     X-Powered-By: PHP/5.2.8
     Location: http://www.hostingcoupons.org/godaddy-coupons/
     Content-type: text/html
     Date: Fri, 24 Apr 2009 21:26:48 GMT
     Server: TinyURL/1.6
or in Python:

     >>> import urllib
     >>> u=urllib.urlopen("http://tinyurl.com/9a4xj6")
     >>> u.url
     'http://www.hostingcoupons.org/godaddy-coupons/'
     >>> 
etc...

-----


Says the guy who wrote his own DNS client.... ;)

-----


touche! Not for external use though...

Java sadly doesn't have a decent non blocking dns resolution system :( On a restart, Mibbit needs to do a few thousand DNS lookups... and quick. I can only stand a thread pool so long.

-----


> ...Java...

Well there's your problem! :P

-----


sigh

Yeah. Handling 1000+ http requests a second on a single 1.4GB VPS is lame isn't it.

Java rocks. But it's not for beginners.

-----


I'd like to know where a link leads to before clicking on it; may be a small tooltip, like someone else in this thread suggested. This would avoid things like "Oh I didn't really expect a video here" to "Oops, my coworker would have thought I opened that NSFW website intentionally".

Sure, this is not a complete solution (there are videos in sites other than Youtube, Metacafe, etc., and NSFW content in just too many websites), but would help in very many cases.

Actually I'm surprised not so many people are concerned about the security implications of having opaque URLs (there's been a lot of talk about this recently, but very little action AFAIK).

I've been thinking about this lately and thought a Firefox extension might be of help. I was just planning to shake off my laziness and learn about how to make an extension so I could make this one.

A positive response to http://news.ycombinator.com/item?id=577896 might make this unnecessary, but then it might not...

-----


It could do caching. That would be nice in case a shortener went down.

If it did caching, it would also act as a proxy. That would be nice if I decided to build a greasemonkey script/firefox add-on to automatically unshorten things; I wouldn't necessarily ping the counters attached to every shortened URL that loads with a page.

-----


I like the way of the tinyURL API better - you simply get the new URL in the body of the response. Otherwise, I am not sure it is easier to parse the XML response from unshort.me than to simply resolve the redirections directly.

-----


Er, my URL-unshortening service just returns the URL ;) http://therealurl.appspot.com/

There are some possible uses for such a service, I think. For example if you want to get this functionality via JavaScript (eg JSONP), or perhaps you just don't want to bother with HTTP.

(unshort.me, I hope you don't mind me plugging it here - if you do, let me know (email's in the profile) and I'll delete this comment. Looks like we're about to have as many unshortening sites as shortening ones, at this rate :)

-----


This is simple service that let you un-shorten URLs created using any of the URL shortening services.

I thought it might be useful to create a single place to un-shorten URLs. I know some of you are tired of hearing about another URL service, but it works with all of the shortening websites such as TinyURL, bit.ly, tr.im, even with Hapylink and others.

-----


Are you saving the urls after someone requests one to be lengthened? It could act as a backup if one of the shorteners went down. Maybe one of the firefox extension developers that expand urls could use your saved urls in that case.

-----


What made you decide to solve this problem? Did you encounter issues that this solved?

-----


Personally, I see value in it.

If I get a shortened URL link from someone, and I'm at work, I would like to go to that site and see what that TinyURL really is before following the link

-----


It would work great with a firefox/whatever plugin that would show you this link as a tooltip, avoiding the copypaste grind

-----


For those who want to the original url before clicking a tiny url, you can use Untiny (http://untiny.me ) Firefox addon (UntinyFox) https://addons.mozilla.org/en-US/firefox/addon/10181

(or check in http://untiny.me/extra/ )

-----


I developed http://untiny.me for one reason, some tiny services (e.g. http://tinyurl.com ) is blocked in my country for no reason ... and may some others are blocked in others countries too...

-----


It aint better to check the http header? It's fastest than a full api request (even for a light one like this)

-----




Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: