--- a/mcbot/cmds/tvcal.lua Sun Oct 23 14:10:39 2011 +0200
+++ b/mcbot/cmds/tvcal.lua Wed Feb 08 19:30:35 2012 +0100
@@ -33,16 +33,18 @@
end
local tabregex = '<td id="d_(%d+_%d+_%d%d%d%d)" class="t?o?day"%s*>%s*\n%s*'..
- '<table>(.-)</table>'
+ '<strong>.-</strong>%s*\n%s*'..
+ '(.-)</td>'
for day, tab in string.gmatch(contents, tabregex) do
local epregex
local d, m, y = day:match("^(%d+)_(%d+)_(%d%d%d%d)$")
day = string.format("%04d-%02d-%02d", y, m, d)
- epregex = '<td><a id="[^"]+" href="[^"]+" class="eplink%s*%w*"%s*>([^<]+)</a>'
- epregex = epregex .. '<span class="seasep%s*%w*"%s*></span><br />'
- epregex = epregex .. '<span class="seasep%s*%w*"%s*>([^<]+)</span>[%s\n]*</td>'
+ epregex = '<ul class="seasep%s*%w*">'..
+ '<li><a [^>]+>([^<]+)</a></li>'.. -- Name
+ '<li>([^<]+)</li>'.. -- Episode
+ '</ul>'
local shows = {}
for name, ep in string.gmatch(tab, epregex) do