Dolda2000 GitWeb
/
automanga.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed batoto search bug.
[automanga.git]
/
manga
/
batoto.py
diff --git
a/manga/batoto.py
b/manga/batoto.py
index
4e957b5
..
cab29b5
100644
(file)
--- a/
manga/batoto.py
+++ b/
manga/batoto.py
@@
-109,9
+109,12
@@
class manga(lib.manga):
cid = m.group(1)
url = self.lib.base + "read/_/" + cid
name = ch.td.a.text
cid = m.group(1)
url = self.lib.base + "read/_/" + cid
name = ch.td.a.text
- cch.append(
chapter(self, [(self, len(cch))],
cid, name, url))
+ cch.append(
(
cid, name, url))
cch.reverse()
cch.reverse()
- self.cch = cch
+ rch = []
+ for n, (cid, name, url) in enumerate(cch):
+ rch.append(chapter(self, [(self, n)], cid, name, url))
+ self.cch = rch
return self.cch
def __str__(self):
return self.cch
def __str__(self):
@@
-141,6
+144,9
@@
class library(lib.library):
page = soup(resp.read())
finally:
resp.close()
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":
ret = []
for child in page.find("div", id="search_results").ol.childGenerator():
if isinstance(child, BeautifulSoup.Tag) and child.name == u"li":