Bugs: Browse | Submit New | Admin

[#21159] Tinyurls don't work any more

Date:
2008-07-11 02:18
Priority:
3
Submitted By:
Zach Copley (zachcopley)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Tinyurls don't work any more

Detailed description
Something must have changed with tinyurl's interface. No matter what URL you give shorturl when using the :tinyurl service,
you just get back the URL for the main tinyurl site (http://www.tinyurl.com/).

You can duplicate with the shorten.rb program in the examples directory that comes with the gem...

e.g.:

"ruby shorten.rb http://www.google.com/ tinyurl"

Result: http://tinyurl.com/


Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-08-19 02:08
Sender: Michael Letterle

the correct index is 4, so what you really need is:

  :tinyurl => Service.new("tinyurl.com") { |s|
      s.action = "/create.php"
      s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[4]
}
    },
Date: 2008-07-18 04:25
Sender: Eric Bowman

They changed the API call, you will need to adjust your shorturl.rb
file until the contributors make the adjustment

 :tinyurl => Service.new("tinyurl.com") { |s|
      s.action = "/api-create.php"
      s.field = "url"
      s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[-1]
}
    },

here is a pwd print of the location on my Mac

/Library/Ruby/Gems/1.8/gems/shorturl-0.8.4/lib

Good luck!

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item