Skip to content

Commit

Permalink
[szurubooru] support 'visuabusters.com/booru' (mikf#6729)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Dec 26, 2024
1 parent 998f949 commit 167a726
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,12 @@ Consider all listed sites to potentially be NSFW.
<td>Posts, Tag Searches</td>
<td></td>
</tr>
<tr>
<td>VISUABUSTERS</td>
<td>https://www.visuabusters.com/booru/</td>
<td>Posts, Tag Searches</td>
<td></td>
</tr>

<tr>
<td colspan="4"><strong>URL Shorteners</strong></td>
Expand Down
4 changes: 4 additions & 0 deletions gallery_dl/extractor/szurubooru.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def _prepare(post):
"root": "https://snootbooru.com",
"pattern": r"snootbooru\.com",
},
"visuabusters": {
"root": "https://www.visuabusters.com/booru",
"pattern": r"(?:www\.)?visuabusters\.com/booru",
},
})


Expand Down
1 change: 1 addition & 0 deletions scripts/supportedsites.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
"vanillarock" : "もえぴりあ",
"vidyart2" : "/v/idyart2",
"vidyapics" : "Vidya Booru",
"visuabusters" : "VISUABUSTERS",
"vk" : "VK",
"vsco" : "VSCO",
"wallpapercave" : "Wallpaper Cave",
Expand Down
39 changes: 39 additions & 0 deletions test/results/visuabusters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

from gallery_dl.extractor import szurubooru


__tests__ = (
{
"#url" : "https://www.visuabusters.com/booru/posts/query=mincy_mouse",
"#category": ("szurubooru", "visuabusters", "tag"),
"#class" : szurubooru.SzurubooruTagExtractor,
"#pattern" : r"https://www\.visuabusters\.com/booru/data/posts/visuabusters_\d+_\w{16}\.\w+",
"#count" : range(2, 5),
},

{
"#url" : "https://www.visuabusters.com/booru/posts/query=",
"#category": ("szurubooru", "visuabusters", "tag"),
"#class" : szurubooru.SzurubooruTagExtractor,
},

{
"#url" : "https://visuabusters.com/booru/posts",
"#category": ("szurubooru", "visuabusters", "tag"),
"#class" : szurubooru.SzurubooruTagExtractor,
},

{
"#url" : "https://www.visuabusters.com/booru/post/2485",
"#category": ("szurubooru", "visuabusters", "post"),
"#class" : szurubooru.SzurubooruPostExtractor,
"#urls" : "https://www.visuabusters.com/booru/data/posts/visuabusters_2485_ynmXFhNmBs3x0cCm.gif",
"#sha1_content": "781fc0f063503d9d3f282558b9fcd69e37045e88",
},

)

0 comments on commit 167a726

Please sign in to comment.