From c72e69b8c6044cf4393b496bcfe73700698f4fa6 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Wed, 11 Dec 2013 02:08:59 +0100 Subject: [PATCH] Fixed batoto search bug. --- manga/batoto.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manga/batoto.py b/manga/batoto.py index 6869973..cab29b5 100644 --- a/manga/batoto.py +++ b/manga/batoto.py @@ -144,6 +144,9 @@ class library(lib.library): page = soup(resp.read()) finally: resp.close() + none = page.find("p", attrs={"class": "no_messages"}) + if none is not None and u"No results" in none.text: + return [] ret = [] for child in page.find("div", id="search_results").ol.childGenerator(): if isinstance(child, BeautifulSoup.Tag) and child.name == u"li": -- 2.11.0