From c53e8f6dc4002bf854092a3b7043bd2a5a9e13c0 Mon Sep 17 00:00:00 2001 From: Kill Your TV Date: Tue, 20 Aug 2013 21:27:37 +0000 Subject: [PATCH] Wikipedia: Avoid showing useless 'non-result'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This stops results like View (previous 20 | next 20) (20 | 50 | 100 | 250 | 500) http://en.wikipedia.org/wiki/Special:Search --- Wikipedia/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Wikipedia/plugin.py b/Wikipedia/plugin.py index 5d37a39..84b3119 100644 --- a/Wikipedia/plugin.py +++ b/Wikipedia/plugin.py @@ -154,7 +154,7 @@ class Wikipedia(callbacks.Plugin): else: ##### etree! p = tree.xpath("//div[@id='mw-content-text']/p[1]") - if len(p) == 0: + if len(p) == 0 or addr.endswith('Special:Search'): reply += _('Not found, or page bad formed.') else: p = p[0]