From cb194062534a8c41a1fc32c8ce1bb6359a731ff7 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Tue, 30 Apr 2013 16:01:35 +0300 Subject: [PATCH] FIX: website/academicearth.lua: Look for YouTube embed URL This website (exclusively?) now hosts the media at YouTube. Update the embed media URL pattern. Signed-off-by: Toni Gundogdu --- share/lua/website/academicearth.lua | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/share/lua/website/academicearth.lua b/share/lua/website/academicearth.lua index e5e8ede..a10c3c7 100644 --- a/share/lua/website/academicearth.lua +++ b/share/lua/website/academicearth.lua @@ -1,6 +1,6 @@ -- libquvi-scripts --- Copyright (C) 2010-2011 Toni Gundogdu +-- Copyright (C) 2010-2011,2013 Toni Gundogdu -- -- This file is part of libquvi-scripts . -- @@ -54,17 +54,8 @@ end function AcademicEarth.get_redirect_url(self) local p = quvi.fetch(self.page_url) - local s = p:match('ytID = "(.-)"') - if s then - self.redirect_url = 'http://youtube.com/e/' .. s - else - local s = p:match('embed src="(.-)"') -- blip - if s then - self.redirect_url = s - else - error('no match: blip or youtube pattern') - end - end + self.redirect_url = p:match('"(http://www%.youtube%.com/watch.-)"') + or error('no match: unrecognized media source') return self end -- 2.11.4.GIT