[saint] fix metadata names/IDs of '/d/' URLs
This commit is contained in:
@@ -53,9 +53,10 @@ class LolisafeAlbumExtractor(LolisafeExtractor):
|
||||
if "name" in file:
|
||||
name = file["name"]
|
||||
file["name"] = name.rpartition(".")[0] or name
|
||||
fid = file["filename"].rpartition("-")[2]
|
||||
if len(fid) == 12:
|
||||
file["id"] = ""
|
||||
_, sep, fid = file["filename"].rpartition("-")
|
||||
if not sep or len(fid) == 12:
|
||||
if "id" not in file:
|
||||
file["id"] = ""
|
||||
file["filename"] = file["name"]
|
||||
else:
|
||||
file["id"] = fid
|
||||
|
||||
@@ -81,6 +81,7 @@ class SaintMediaExtractor(SaintAlbumExtractor):
|
||||
else: # /d/
|
||||
file = {
|
||||
"file" : text.unescape(extr('<a href="', '"')),
|
||||
"id" : album_id,
|
||||
"id_dl" : album_id,
|
||||
"name" : album_id,
|
||||
"filename" : album_id,
|
||||
|
||||
Reference in New Issue
Block a user