[tumblr] catch exception for 'hash' extraction (fixes #129)

This commit is contained in:
Mike Fährmann
2018-12-02 19:48:09 +01:00
parent 40e30694f3
commit 95636418ad

View File

@@ -158,7 +158,10 @@ class TumblrExtractor(Extractor):
post["num"] += 1
parts = post["name"].split("_")
post["hash"] = parts[1] if parts[1] != "inline" else parts[2]
try:
post["hash"] = parts[1] if parts[1] != "inline" else parts[2]
except IndexError:
post["hash"] = ""
return Message.Url, url, post