From 519d7bd38cf4f0386dbb8148349f0377af142b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Rubinstein?= Date: Tue, 23 Aug 2011 17:47:05 +0200 Subject: [PATCH] fix bug when there is no vol number --- weboob/backends/mangafox/backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weboob/backends/mangafox/backend.py b/weboob/backends/mangafox/backend.py index 8e5b82cc..2cadf1a6 100644 --- a/weboob/backends/mangafox/backend.py +++ b/weboob/backends/mangafox/backend.py @@ -44,7 +44,7 @@ class DisplayPage(BasePage): return self.document.xpath("//select[@onchange='change_page(this)'][1]/option/attribute::value") class MangafoxBrowser(BaseBrowser): - PAGES = { r'http://.+\.mangafox.\w+/manga/[^/]+/[^/]+/[^/]+/.+\.html': DisplayPage } + PAGES = { r'http://.+\.mangafox.\w+/manga/[^/]+/[^/]+/([^/]+/)?.+\.html': DisplayPage } def iter_gallery_images(self, gallery): self.location(gallery.url) @@ -73,7 +73,7 @@ class MangafoxBackend(BaseBackend, ICapGallery): return self.browser.iter_gallery_images(gallery) def get_gallery(self, _id): - match = re.match(r'(?:(?:.+mangafox.com/manga)?/)?([^/]+/[^/]+/[^/]+)', _id) + match = re.match(r'(?:(?:.+mangafox.com/manga)?/)?([^/]+/[^/]+(?:/[^/]+)?)', _id) if match is None: return None