From e3e754eed773b0860975bf98eb43b68f078d4b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 3 Nov 2015 00:19:04 +0100 Subject: [PATCH] [imgbox] use text.extract_all --- gallery_dl/extractor/imgbox.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/imgbox.py b/gallery_dl/extractor/imgbox.py index f466c96a..b3a01dd7 100644 --- a/gallery_dl/extractor/imgbox.py +++ b/gallery_dl/extractor/imgbox.py @@ -55,9 +55,11 @@ class ImgboxExtractor(AsynchronousExtractor): def get_file_metadata(self, page): """Collect metadata for a downloadable file""" data = self.metadata.copy() - data["num"] , pos = text.extract(page, '   ', ' of ') - data["image-key"], pos = text.extract(page, '/i.imgbox.com/', '?download', pos) - data["name"] , pos = text.extract(page, ' title="', '"', pos) + data, _ = text.extract_all(page, ( + ("num" , '   ', ' of '), + ("image-key", '/i.imgbox.com/', '?download'), + ("name" , ' title="', '"'), + ), values=data) return data def get_file_url(self, page):