X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=manga%2Fmangafox.py;h=c95a77be7c33219c7a1d9281252159a4280c02a9;hb=299d3f50467a6e719819ca95e7f5416a16b535fc;hp=30329c2db8170961d9148845e452a9f26700e6b9;hpb=d2f58cfc0a7804bb3aad1cbe190c6b83a2a5cde3;p=automanga.git diff --git a/manga/mangafox.py b/manga/mangafox.py index 30329c2..c95a77b 100644 --- a/manga/mangafox.py +++ b/manga/mangafox.py @@ -1,4 +1,4 @@ -import urllib +import urllib, re import BeautifulSoup import lib, htcache soup = BeautifulSoup.BeautifulSoup @@ -117,6 +117,8 @@ def nextel(el): return el class manga(lib.manga): + cure = re.compile(r"/v\d+/c[\d.]+/$") + def __init__(self, lib, id, name, url): self.lib = lib self.id = id @@ -156,7 +158,7 @@ class manga(lib.manga): url = n.a["href"].encode("us-ascii") if url[-7:] == "/1.html": url = url[:-6] - elif url[-1:] == "/": + elif self.cure.search(url) is not None: pass else: raise Exception("parse error: unexpected chapter URL for %r: %s" % (self, url))