merge #7412: [weasyl] use 'gallery-dl' User-Agent header

This commit is contained in:
Mike Fährmann
2025-04-24 19:34:27 +02:00
2 changed files with 3 additions and 2 deletions

View File

@@ -661,7 +661,7 @@ extractor.*.user-agent
Type
``string``
Default
* ``"gallery-dl/VERSION"``: ``[Danbooru]``, ``mangadex``
* ``"gallery-dl/VERSION"``: ``[Danbooru]``, ``mangadex``, ``weasyl``
* ``"gallery-dl/VERSION (by mikf)"``: ``[E621]``
* ``"Patreon/72.2.28 (Android; Android 14; Scale/2.10)"``: ``patreon``
* ``"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/LATEST.0.0.0 Safari/537.36"``: ``instagram``

View File

@@ -7,7 +7,7 @@
"""Extractors for https://www.weasyl.com/"""
from .common import Extractor, Message
from .. import text
from .. import text, util
BASE_PATTERN = r"(?:https://)?(?:www\.)?weasyl.com/"
@@ -18,6 +18,7 @@ class WeasylExtractor(Extractor):
filename_fmt = "{submitid} {title}.{extension}"
archive_fmt = "{submitid}"
root = "https://www.weasyl.com"
useragent = util.USERAGENT
@staticmethod
def populate_submission(data):