Added alternative mangafox chapter URLs.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 28 May 2013 06:36:20 +0000 (08:36 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 28 May 2013 06:36:20 +0000 (08:36 +0200)
manga/mangafox.py

index b165d21..30329c2 100644 (file)
@@ -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