[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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user