Wikipedia: Avoid showing useless 'non-result'.
This stops results like View (previous 20 | next 20) (20 | 50 | 100 | 250 | 500) http://en.wikipedia.org/wiki/Special:Searchmaster
parent
190e172252
commit
c53e8f6dc4
|
@ -154,7 +154,7 @@ class Wikipedia(callbacks.Plugin):
|
||||||
else:
|
else:
|
||||||
##### etree!
|
##### etree!
|
||||||
p = tree.xpath("//div[@id='mw-content-text']/p[1]")
|
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.')
|
reply += _('Not found, or page bad formed.')
|
||||||
else:
|
else:
|
||||||
p = p[0]
|
p = p[0]
|
||||||
|
|
Loading…
Reference in New Issue