[tumblr] fix inline extraction #2

Using only the "comment" field isn't enough ...

[ci skip]
This commit is contained in:
Mike Fährmann
2018-12-11 21:56:12 +01:00
parent f6bf66f72c
commit 049a9575c4

View File

@@ -107,7 +107,7 @@ class TumblrExtractor(Extractor):
if self.inline and "reblog" in post: # inline media
# only "chat" posts are missing a "reblog" key in their
# API response, but they can't contain images/videos anyway
body = post["reblog"]["comment"]
body = post["reblog"]["comment"] + post["reblog"]["tree_html"]
for url in re.findall('<img src="([^"]+)"', body):
url = _original_inline_image(url)
yield self._prepare_image(url, post)