[deviantart] add 'index_base36' metadata field (closes #1099)
This is the same ID as found in 'filename' without the 'd' in front, which is just 'index' encoded in base36.
This commit is contained in:
parent
b9bfa4c675
commit
91db8df1c7
@ -165,11 +165,12 @@ class DeviantartExtractor(Extractor):
|
||||
|
||||
# filename metadata
|
||||
alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"
|
||||
deviation["index_base36"] = util.bencode(deviation["index"], alphabet)
|
||||
sub = re.compile(r"\W").sub
|
||||
deviation["filename"] = "".join((
|
||||
sub("_", deviation["title"].lower()), "_by_",
|
||||
sub("_", deviation["author"]["username"].lower()), "-d",
|
||||
util.bencode(deviation["index"], alphabet),
|
||||
deviation["index_base36"],
|
||||
))
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user