changeset 39 | 237af42156a1 |
parent 38 | a51ddbce247b |
child 43 | 7f9ecc483f73 |
--- a/mcbot/cmds/tvcal.lua Mon Apr 19 10:20:28 2010 +0200 +++ b/mcbot/cmds/tvcal.lua Sat Apr 24 10:45:00 2010 +0200 @@ -28,6 +28,10 @@ local function parse_webpage (url) local contents = shcmd("curl "..url) + if not contents then + return nil, "Could not fetch calendar, please try again later!" + end + local tabregex = '<td id="d_(%d+_%d+_%d%d%d%d)" class="t?o?day"%s*>%s*\n%s*'.. '<table>(.-)</table>'