[bunkr] extract 'id_url' metadata (#6935)
and use it as 'id' alternative instead of 'name' in default archive IDs
This commit is contained in:
@@ -60,7 +60,7 @@ class BunkrAlbumExtractor(LolisafeAlbumExtractor):
|
|||||||
"""Extractor for bunkr.si albums"""
|
"""Extractor for bunkr.si albums"""
|
||||||
category = "bunkr"
|
category = "bunkr"
|
||||||
root = "https://bunkr.si"
|
root = "https://bunkr.si"
|
||||||
archive_fmt = "{album_id}_{id|name}"
|
archive_fmt = "{album_id}_{id|id_url}"
|
||||||
pattern = BASE_PATTERN + r"/a/([^/?#]+)"
|
pattern = BASE_PATTERN + r"/a/([^/?#]+)"
|
||||||
example = "https://bunkr.si/a/ID"
|
example = "https://bunkr.si/a/ID"
|
||||||
|
|
||||||
@@ -171,6 +171,7 @@ class BunkrAlbumExtractor(LolisafeAlbumExtractor):
|
|||||||
return {
|
return {
|
||||||
"file" : text.unescape(file_url),
|
"file" : text.unescape(file_url),
|
||||||
"name" : text.unescape(file_name),
|
"name" : text.unescape(file_name),
|
||||||
|
"id_url" : webpage_url.rpartition("/")[2],
|
||||||
"_http_headers" : {"Referer": response.url},
|
"_http_headers" : {"Referer": response.url},
|
||||||
"_http_validate": self._validate,
|
"_http_validate": self._validate,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ __tests__ = (
|
|||||||
"file" : "https://brg-bk.cdn.gigachad-cdn.ru/test-%E3%83%86%E3%82%B9%E3%83%88-%22%26%3E-QjgneIQv.png",
|
"file" : "https://brg-bk.cdn.gigachad-cdn.ru/test-%E3%83%86%E3%82%B9%E3%83%88-%22%26%3E-QjgneIQv.png",
|
||||||
"filename" : "test-テスト-\"&>-QjgneIQv",
|
"filename" : "test-テスト-\"&>-QjgneIQv",
|
||||||
"id" : "QjgneIQv",
|
"id" : "QjgneIQv",
|
||||||
|
"id_url" : "1044478",
|
||||||
"name" : "test-テスト-\"&>",
|
"name" : "test-テスト-\"&>",
|
||||||
"num" : 1,
|
"num" : 1,
|
||||||
},
|
},
|
||||||
@@ -62,7 +63,8 @@ __tests__ = (
|
|||||||
"#class" : bunkr.BunkrAlbumExtractor,
|
"#class" : bunkr.BunkrAlbumExtractor,
|
||||||
"#count" : 2,
|
"#count" : 2,
|
||||||
|
|
||||||
"id": "",
|
"id" : "",
|
||||||
|
"id_url": {"UPKDHBf0CvrCe", "zQgSePr1f4HZ2"},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -223,6 +225,7 @@ __tests__ = (
|
|||||||
"file" : "https://brg-bk.cdn.gigachad-cdn.ru/file-r5fmwjdd.zip",
|
"file" : "https://brg-bk.cdn.gigachad-cdn.ru/file-r5fmwjdd.zip",
|
||||||
"filename" : "file-r5fmwjdd",
|
"filename" : "file-r5fmwjdd",
|
||||||
"id" : "r5fmwjdd",
|
"id" : "r5fmwjdd",
|
||||||
|
"id_url" : "38792076",
|
||||||
"name" : "file",
|
"name" : "file",
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -242,6 +245,7 @@ __tests__ = (
|
|||||||
"#urls" : "https://kebab.bunkr.ru/80ca5405-8b8d-4f9f-8167-8b046bb9dc67.mp4",
|
"#urls" : "https://kebab.bunkr.ru/80ca5405-8b8d-4f9f-8167-8b046bb9dc67.mp4",
|
||||||
|
|
||||||
"id" : "",
|
"id" : "",
|
||||||
|
"id_url" : "wYGCKbGhSvuAW",
|
||||||
"name" : "0hwndshtfmj7hcbut1nd4_source",
|
"name" : "0hwndshtfmj7hcbut1nd4_source",
|
||||||
"filename" : "0hwndshtfmj7hcbut1nd4_source",
|
"filename" : "0hwndshtfmj7hcbut1nd4_source",
|
||||||
"extension": "mp4",
|
"extension": "mp4",
|
||||||
|
|||||||
Reference in New Issue
Block a user