From 71acbdabf4f2ff445d9605b0e5a6d0f523325cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 3 Dec 2019 16:53:08 +0100 Subject: [PATCH] [2chan] fix metadata extraction --- gallery_dl/extractor/2chan.py | 10 ++++++---- gallery_dl/extractor/wikiart.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/2chan.py b/gallery_dl/extractor/2chan.py index 33e79293..c34cfecc 100644 --- a/gallery_dl/extractor/2chan.py +++ b/gallery_dl/extractor/2chan.py @@ -68,6 +68,8 @@ class _2chanThreadExtractor(Extractor): def parse(self, post): """Build post-object by extracting data from an HTML post""" data = self._extract_post(post) + if data["name"]: + data["name"] = data["name"].strip() if '', ''), - ("name", '', ' '), - ("now" , ' ', ' '), + ("post", 'class="csb">' , '<'), + ("name", 'class="cnm">' , '<'), + ("now" , 'class="cnw">' , '<'), + ("no" , 'class="cno">No.', '<'), (None , '', ''), ))[0] diff --git a/gallery_dl/extractor/wikiart.py b/gallery_dl/extractor/wikiart.py index 463733fd..ac289df5 100644 --- a/gallery_dl/extractor/wikiart.py +++ b/gallery_dl/extractor/wikiart.py @@ -93,7 +93,7 @@ class WikiartArtworksExtractor(WikiartExtractor): directory_fmt = ("{category}", "Artworks by {group!c}", "{type}") pattern = BASE_PATTERN + r"/paintings-by-([\w-]+)/([\w-]+)" test = ("https://www.wikiart.org/en/paintings-by-media/grisaille", { - "url": "f92d55669fa949491c26a5437527adb14b35b8cc", + "url": "228426a9d32b5bba9d659944c6b0ba73883af33f", }) def __init__(self, match):