From b1db194c1434b345e542be0950971d1384cb9921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 9 May 2019 22:50:25 +0200 Subject: [PATCH] [reactor] update and improve - split 'tags' into a list - parse 'date' into a datetime object - fix webm/mp4 URLs --- gallery_dl/extractor/reactor.py | 23 ++++++++++++----------- gallery_dl/postprocessor/metadata.py | 7 +++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/gallery_dl/extractor/reactor.py b/gallery_dl/extractor/reactor.py index 1bf23e1c..59d502ae 100644 --- a/gallery_dl/extractor/reactor.py +++ b/gallery_dl/extractor/reactor.py @@ -46,7 +46,7 @@ class ReactorExtractor(SharedConfigMixin, Extractor): yield Message.Directory, data for post in self.posts(): for image in self._parse_post(post): - url = image["file_url"] + url = image["url"] image.update(data) yield Message.Url, url, text.nameext_from_url(url, image) @@ -102,7 +102,7 @@ class ReactorExtractor(SharedConfigMixin, Extractor): return num = 0 - date = data["datePublished"] + date = text.parse_datetime(data["datePublished"]) user = data["author"]["name"] description = text.unescape(data["description"]) title, _, tags = text.unescape(data["headline"]).partition(" / ") @@ -111,6 +111,7 @@ class ReactorExtractor(SharedConfigMixin, Extractor): if not tags: title, tags = tags, title + tags = tags.split(" :: ") for image in images: url = text.extract(image, ' src="', '"')[0] @@ -123,11 +124,11 @@ class ReactorExtractor(SharedConfigMixin, Extractor): if image.startswith("