From 0223bd8d94a77df38eebfef266ada0cdf46f59c7 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 24 Apr 2012 18:54:13 +0100 Subject: [PATCH] dailymotion: Fix overeager ID fetching On this page: http://dailymotion.com/video/xpdcti the ID contained "?autoplay=1" followed by a number of unrelated lines --- share/lua/website/dailymotion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/lua/website/dailymotion.lua b/share/lua/website/dailymotion.lua index a55b5cd..2e6c17c 100644 --- a/share/lua/website/dailymotion.lua +++ b/share/lua/website/dailymotion.lua @@ -66,7 +66,7 @@ function parse(self) self.title = p:match('title="(.-)"') or error("no match: media title") - self.id = p:match("video/(.-)_") + self.id = p:match("video/([^%?_]+)") or error("no match: media ID") self.thumbnail_url = p:match('"og:image" content="(.-)"') or '' -- 2.11.4.GIT