hupili/snsapi — pull request #57 by hzhua (2013-02-20 14:34:00+00:00)
Title: expand and short an url (short is just for sina)

1.expand a short url is realized by _expand_url() in snsbase.py and an unit test is added

2.short an url is realized by _short_url_weibo() in sina.py (if an url is shorten, it will be expanded)
3.detecting all urls in text and shorting them is realized by _replace_with_short_url() in sina.py
4.update() is changed. It will call _replace_with_short_url() at the beginning (before _cat() )

_expand_url() can expand any short url.
but 2,3,4 are only for sina weibo
Actually, when you send an url to sina weibo, it will short it automatically. If you send a short url shorten by t.cn, it will expand it to the destination and short it with t.cn.

So short an url is no meaning for sina weibo, but we may use it to short an url and send to other plantform.