Retrieve link HTML title
Closed this issue · 6 comments
When shortening an URL, Firefly should try to retrieve the remote HTML page and extract the title for display in the admin panel.
I'll do this one if you don't mind.
Go right ahead! Feel free to discuss options first here or on gitter.
My first thought was just to use nokogiri in ItemRepository#create_from_url. However, that might slow down the create action noticeably. We could also put the process in a worker (and update the title when its finished) along with any re-hosting tasks created at a later point. The problem with that, however, is that it might make it more difficult to deploy and less beginner friendly.
Note that nokogiri is already a dependency in firefly.
I think workers will be needed anyway, especially when we're going to re-host images. Sidekiq is my favourite as it's fast and not too much rails-oriented. We can figure out deployment later. Nokogiri seems like a good choice.
Ok, I'll go for Sidekiq + Nokogiri then.