[tumblr] in case of exception use filename as 'hash' (#129)

While a filename might not be a real 'hash', or comparable to what
tumbler usually provides, it is still better than an empty string.
At least as long as "alternatives" in format strings aren't implemented.
pull/133/head
Mike Fährmann 6 years ago
parent 95636418ad
commit ad2cefda6b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -161,7 +161,8 @@ class TumblrExtractor(Extractor):
try:
post["hash"] = parts[1] if parts[1] != "inline" else parts[2]
except IndexError:
post["hash"] = ""
# filename doesn't follow the usual pattern (#129)
post["hash"] = post["name"]
return Message.Url, url, post

Loading…
Cancel
Save