From 13ebca2a4856ab3c4147722873f07928d34b9eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 28 Jun 2015 01:22:39 +0200 Subject: [PATCH] [mangareader] supply correct width and height --- gallery_dl/extractor/mangareader.py | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/gallery_dl/extractor/mangareader.py b/gallery_dl/extractor/mangareader.py index 48c8358e..62575308 100644 --- a/gallery_dl/extractor/mangareader.py +++ b/gallery_dl/extractor/mangareader.py @@ -39,7 +39,6 @@ class MangaReaderExtractor(AsynchronousExtractor): url = self.url_base + self.part while True: url, image_url, data = self.get_page_metadata(url) - print(url) if url is None: return yield Message.Directory, data @@ -48,25 +47,30 @@ class MangaReaderExtractor(AsynchronousExtractor): def get_page_metadata(self, page_url): """Collect next url, image-url and metadata for one manga-page""" page = self.request(page_url).text - descr , pos = self.extract(page, '', '', pos) - print(page[pos:pos+3]) - if page[pos+1] != "a": + extr = self.extract + width = None + descr, pos = extr(page, '', '') + url, pos = extr(page, ' href="', '"', pos) + if width is None: + width , pos = extr(page, '