From d2f58cfc0a7804bb3aad1cbe190c6b83a2a5cde3 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 28 May 2013 08:36:20 +0200 Subject: [PATCH] Added alternative mangafox chapter URLs. --- manga/mangafox.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/manga/mangafox.py b/manga/mangafox.py index b165d21..30329c2 100644 --- a/manga/mangafox.py +++ b/manga/mangafox.py @@ -154,9 +154,13 @@ class manga(lib.manga): except KeyError: pass url = n.a["href"].encode("us-ascii") - if url[-7:] != "/1.html": + if url[-7:] == "/1.html": + url = url[:-6] + elif url[-1:] == "/": + pass + else: raise Exception("parse error: unexpected chapter URL for %r: %s" % (self, url)) - vol.ch.append(chapter(vol, vol.stack + [(vol, o)], chid, name, url[:-6])) + vol.ch.append(chapter(vol, vol.stack + [(vol, o)], chid, name, url)) cvol.append(vol) self.cvol = cvol return self.cvol -- 2.11.0