From addcf40c136c598ce88fb5fd0a3bdb3dcc32d804 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Sun, 4 Dec 2016 15:57:43 +0800 Subject: [PATCH] Update --- commands/todayinhistory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/todayinhistory.py b/commands/todayinhistory.py index 68af4af2..f5f2c9d2 100644 --- a/commands/todayinhistory.py +++ b/commands/todayinhistory.py @@ -9,10 +9,10 @@ __registry__ = cr = CommandRegistry() @cr.register('today_in_history', '历史上的今天') def today_in_history(_, ctx_msg): - core.echo('正在查询,请稍等……', ctx_msg) resp = requests.get('http://tool.lu/todayonhistory/') ok = False if resp.status_code == 200: + core.echo('历史上的今天:', ctx_msg) html = etree.HTML(resp.text) li_elems = html.xpath('//ul[@id="tohlis"]/li') # reply = reduce(lambda x, y: x.text + '\n' + y.text, li_elems)