1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

[bunkr] support 'bunkr.cr' URLs

This commit is contained in:
Mike Fährmann 2024-11-10 20:41:39 +01:00
parent 096b9f1d26
commit 2b96d638dc
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 26 additions and 13 deletions

View File

@ -22,13 +22,14 @@ else:
BASE_PATTERN = ( BASE_PATTERN = (
r"(?:bunkr:(?:https?://)?([^/?#]+)|" r"(?:bunkr:(?:https?://)?([^/?#]+)|"
r"(?:https?://)?(?:app\.)?(bunkr+" r"(?:https?://)?(?:app\.)?(bunkr+"
r"\.(?:s[kiu]|[cf]i|p[hks]|ru|la|is|to|a[cx]" r"\.(?:s[kiu]|c[ir]|fi|p[hks]|ru|la|is|to|a[cx]"
r"|black|cat|media|red|site|ws|org)))" r"|black|cat|media|red|site|ws|org)))"
) )
DOMAINS = [ DOMAINS = [
"bunkr.ac", "bunkr.ac",
"bunkr.ci", "bunkr.ci",
"bunkr.cr",
"bunkr.fi", "bunkr.fi",
"bunkr.ph", "bunkr.ph",
"bunkr.pk", "bunkr.pk",

View File

@ -29,23 +29,21 @@ __tests__ = (
{ {
"#url" : "https://bunkr.is/a/iXTTc1o2", "#url" : "https://bunkr.is/a/iXTTc1o2",
"#comment" : "cdn4",
"#category": ("lolisafe", "bunkr", "album"), "#category": ("lolisafe", "bunkr", "album"),
"#class" : bunkr.BunkrAlbumExtractor, "#class" : bunkr.BunkrAlbumExtractor,
"#urls" : ( "#urls" : (
"https://i-milkshake.bunkr.ru/image-sZrQUeOx.jpg?download=true", "https://i-milkshake.bunkr.ru/image-sZrQUeOx.jpg?download=true",
"https://burger.bunkr.ru/video-gLn1hgpw.mp4",
), ),
"#sha1_content": "caf7c3d3439d94e83b3c24ddaf5a3a48aa057519", "#sha1_content": "caf7c3d3439d94e83b3c24ddaf5a3a48aa057519",
"album_id" : "iXTTc1o2", "album_id" : "iXTTc1o2",
"album_name" : "test2", "album_name" : "test2",
"album_size" : "561.6 KB", "album_size" : "534.6 KB",
"count" : 2, "count" : 1,
"filename" : r"re:video-gLn1hgpw|image-sZrQUeOx", "filename" : r"image-sZrQUeOx",
"id" : r"re:gLn1hgpw|sZrQUeOx", "id" : r"sZrQUeOx",
"name" : r"re:video|image", "name" : r"image",
"num" : range(1, 2), "num" : 1,
}, },
{ {
@ -57,6 +55,11 @@ __tests__ = (
"#count" : 7, "#count" : 7,
}, },
{
"#url" : "https://bunkr.ph/a/Lktg9Keq",
"#class" : bunkr.BunkrAlbumExtractor,
},
{ {
"#url" : "https://bunkr.ps/a/Lktg9Keq", "#url" : "https://bunkr.ps/a/Lktg9Keq",
"#class" : bunkr.BunkrAlbumExtractor, "#class" : bunkr.BunkrAlbumExtractor,
@ -85,6 +88,12 @@ __tests__ = (
"#class" : bunkr.BunkrAlbumExtractor, "#class" : bunkr.BunkrAlbumExtractor,
}, },
{
"#url" : "https://bunkr.cr/a/Lktg9Keq",
"#category": ("lolisafe", "bunkr", "album"),
"#class" : bunkr.BunkrAlbumExtractor,
},
{ {
"#url" : "https://bunkr.fi/a/Lktg9Keq", "#url" : "https://bunkr.fi/a/Lktg9Keq",
"#category": ("lolisafe", "bunkr", "album"), "#category": ("lolisafe", "bunkr", "album"),

View File

@ -9,12 +9,15 @@ from gallery_dl.extractor import imagehosts
__tests__ = ( __tests__ = (
{ {
"#url" : "https://imgspice.com/nwfwtpyog50y/test.png.html", "#url" : "https://imgspice.com/q1taxkhxprrn/58410038_cal022jsp_308191001.jpg.html",
"#category": ("imagehost", "imgspice", "image"), "#category": ("imagehost", "imgspice", "image"),
"#class" : imagehosts.ImgspiceImageExtractor, "#class" : imagehosts.ImgspiceImageExtractor,
"#sha1_url" : "b8c30a8f51ee1012959a4cfd46197fabf14de984", "#urls" : "https://img30.imgspice.com/i/03792/q1taxkhxprrn.jpg",
"#sha1_metadata": "100e310a19a2fa22d87e1bbc427ecb9f6501e0c0", "#sha1_content" : "f1de8e58a7c2ef747a206a38f96c5623b8a83edc",
"#sha1_content" : "0c8768055e4e20e7c7259608b67799171b691140",
"extension": "jpg",
"filename" : "58410038_cal022jsp_308191001",
"token" : "q1taxkhxprrn",
}, },
) )