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

[bunkr] add 'tlds' option to allow URLs with all TLDs (#5875, #6017)

This commit is contained in:
Mike Fährmann 2024-08-24 20:45:44 +02:00
parent a364263810
commit 46c3971c88
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 27 additions and 6 deletions

View File

@ -1457,6 +1457,19 @@ Description
Process reposts.
extractor.bunkr.tlds
--------------------
Type
``bool``
Default
``false``
Description
Controls which ``bunkr`` TLDs to accept.
* ``true``: Match URLs with *all* possible TLDs (e.g. ``bunkr.xyz`` or ``bunkrrr.duck``)
* ``false``: Match only URLs with known TLDs
extractor.cien.files
--------------------
Type

View File

@ -9,13 +9,21 @@
"""Extractors for https://bunkr.si/"""
from .lolisafe import LolisafeAlbumExtractor
from .. import text
from .. import text, config
BASE_PATTERN = (
r"(?:bunkr:(?:https?://)?([^/?#]+)|"
r"(?:https?://)?(?:app\.)?(bunkr+"
r"\.(?:s[kiu]|[cf]i|ru|la|is|to|a[cx]|black|cat|media|red|site|ws|org)))"
)
if config.get(("extractor", "bunkr"), "tlds"):
BASE_PATTERN = (
r"(?:bunkr:(?:https?://)?([^/?#]+)|"
r"(?:https?://)?(?:app\.)?(bunkr+\.\w+))"
)
else:
BASE_PATTERN = (
r"(?:bunkr:(?:https?://)?([^/?#]+)|"
r"(?:https?://)?(?:app\.)?(bunkr+"
r"\.(?:s[kiu]|[cf]i|ru|la|is|to|a[cx]"
r"|black|cat|media|red|site|ws|org)))"
)
LEGACY_DOMAINS = {
"bunkr.ru",