[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:
@@ -165,11 +165,12 @@ class DeviantartExtractor(Extractor):
|
|||||||
|
|
||||||
# filename metadata
|
# filename metadata
|
||||||
alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"
|
alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"
|
||||||
|
deviation["index_base36"] = util.bencode(deviation["index"], alphabet)
|
||||||
sub = re.compile(r"\W").sub
|
sub = re.compile(r"\W").sub
|
||||||
deviation["filename"] = "".join((
|
deviation["filename"] = "".join((
|
||||||
sub("_", deviation["title"].lower()), "_by_",
|
sub("_", deviation["title"].lower()), "_by_",
|
||||||
sub("_", deviation["author"]["username"].lower()), "-d",
|
sub("_", deviation["author"]["username"].lower()), "-d",
|
||||||
util.bencode(deviation["index"], alphabet),
|
deviation["index_base36"],
|
||||||
))
|
))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user