0

twitter rss feed links comes short (like http://t.co/rwkYrSPD)

I want to get the direct link with using yahoo pipes

How to do it?

Ωmega
  • 42,614
  • 34
  • 134
  • 203
snjflame
  • 41
  • 1
  • 1
  • 7

3 Answers3

1

Well, obviously you can simply go to the page. for example, http://t.co/rwkYrSPD becomes http://trailers.apple.com/trailers/focus_features/paranorman/

Kevin Li
  • 150
  • 11
0

Does Yahoo Pipes have the ability to execute a HEAD request against a URL? If you run a HEAD against that url (curl -I 'http://t.co/rwkYrSPD') you'll get back an HTTP/1.1 301 Moved Permanently response with the actual URL as the Location header.

Lily Ballard
  • 182,031
  • 33
  • 381
  • 347
  • looks like t.co urls direct to tinyurl, so you'd have to run down the redirect chain until you get a status code % 200 < 100 – Colin Dunklau Jun 29 '12 at 21:48
  • @ColinDunklau: This particular t.co URL is redirecting to tinyurl. Others aren't going to do that. But yes, if you want the "true" URL you need to keep running `HEAD` until you stop getting 301 redirects. – Lily Ballard Jun 29 '12 at 21:49
0

I realise it's quite a bit later, now, but check out the source of this Pipe, which uses the LongURL API (e.g., http://api.longurl.org/v2/expand?url=http://t.co/rwkYrSPD) together with YQL.

jbaums
  • 27,115
  • 5
  • 79
  • 119