From 501e90085ef5889036899a006796c13110255fe6 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 15 Sep 2010 15:26:19 +0200 Subject: tumblr: embed Vimeo videos --- data/rbot/plugins/tumblr.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/tumblr.rb b/data/rbot/plugins/tumblr.rb index ee19ba23..e164257e 100644 --- a/data/rbot/plugins/tumblr.rb +++ b/data/rbot/plugins/tumblr.rb @@ -9,7 +9,7 @@ # # Submit URLs to channel-specific tumblr accounts # -# TODO support video better (e.g. Vimeo or anything else with embed) +# TODO support other video providers (maybe detect embed codes?) # TODO support image better (e.g. pages with a single big image) # TODO customize caption/description format # TODO do not reblog own posts (maybe?) @@ -97,7 +97,7 @@ class TumblrPlugin < Plugin data = PHOTO data << CAPTION if line else - if url.match(%r{^http://(\w+\.)?youtube\.com/watch.*}) + if url.match(%r{^http://(\w+\.)?(youtube\.com/watch.*|vimeo.com/\d+)}) data = VIDEO data << CAPTION if line else -- cgit v1.2.3