I have entries like: Stuck in http://tinyurl.com/34acxr
Which should be: Stuck in http://ikeahacker.blogspot.com/
The first (current) option doesn't tell you anything about what I'm
stuck in. The second does.
I'd think it should be up to the end users to shorten if they want to,
or even the API developers could do it if it suited their application.
Cheers!
Rick Measham
On Mar 21, 10:01 pm, Rick Measham <r...@isite.net.au> wrote:
> Any chance we can NOT use tinyURL? It would save twitter the lookups and
> relying on a third party's services, but it would make it easier to use
> the URL in a sentence.
>
> I have entries like: Stuck inhttp://tinyurl.com/34acxr
> Which should be: Stuck inhttp://ikeahacker.blogspot.com/
ElfURL is an open source Rails shortener:
http://dev.biggu.com/repos/elfurl/
As well, Ma.gnolia uses a shortener in its service.
Finally, twttr.com is 2 characters shorter than tinyurl.com. ;)
Chris
--
Chris Messina
Citizen Provocateur &
Open Source Ambassador-at-Large
Work: http://citizenagency.com
Blog: http://factoryjoe.com/blog
Cell: 412 225-1051
Skype: factoryjoe
This email is: [ ] bloggable [X] ask first [ ] private
I’d also LOVE to be able to get <img/> tags in, but that be a bit
much…
-Greg
However, Textile formatting would be a nice addition since it's
concise and the inline formatting follows standard convention (* for
bold, / for italics)... Thus you could link to things like this:
Stuck in my "car":http://ford.com
Chris
Right now, we shorten URLs via TinyURL if:
1. the length of the URL is greater than 40 characters
AND
2. The URL includes non-alphanumeric characters (ie, it looks
complicated).
We also maintain an audit log of shortened URLs, and we timeout if
TinyURL doesn't answer in six seconds.
The auto-linking code in Rails is our main source of problems with
URL shortening. That code relies on a complicated regular expression
that doesn't catch many valid URLs. A number of patches have been
submitted to improve auto-linking, but Rails core hasn't moved on
them. We may end up tweaking the regex ourselves so things like
Flickr links aren't broken.
Thanks for your suggestions!
--
Alex Payne
Obvious
http://twitter.com/al3x
import urllib
def get_tinyurl(long_url):
url = "http://tinyurl.com/api-create.php"
params=urllib.urlencode({'url':long_url,})
f = urllib.urlopen(url,params)
short_url = f.read()
return short_url
--
Clint Ecker / Sr. Web Dev / STONE WARD
Little Rock / [ Chicago ]
312.464.1443, ext. 111
http://www.stoneward.com/
Oh, Clint.... *shakes head*
BTW, thanks to Ars for the usage and coverage of Twitter.
--
- Ed Finkler
http://funkatron.com/