diff --git a/docs/configuration.rst b/docs/configuration.rst index 039db006..99caba67 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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`` diff --git a/gallery_dl/extractor/weasyl.py b/gallery_dl/extractor/weasyl.py index 13b05206..ed2a395d 100644 --- a/gallery_dl/extractor/weasyl.py +++ b/gallery_dl/extractor/weasyl.py @@ -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):