From 7e513f35f2ae38f7cf8a3ccc38253b4df3d5e6ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 10 Jan 2026 17:42:56 +0100 Subject: [PATCH] [wikimedia] use 'gallery-dl/' User-Agent (#8770 #8861) --- docs/configuration.rst | 1 + gallery_dl/extractor/wikimedia.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 0e69eaea..98b8175a 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -803,6 +803,7 @@ Default * ``[Danbooru]`` * ``mangadex`` * ``weasyl`` + * ``[wikimedia]`` * ``zerochan`` ``"gallery-dl/VERSION (by mikf)"`` * ``[E621]`` diff --git a/gallery_dl/extractor/wikimedia.py b/gallery_dl/extractor/wikimedia.py index aa19fdb8..97e6f2bd 100644 --- a/gallery_dl/extractor/wikimedia.py +++ b/gallery_dl/extractor/wikimedia.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Copyright 2022 Ailothaen -# Copyright 2024-2025 Mike Fährmann +# Copyright 2024-2026 Mike Fährmann # # 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 @@ -10,7 +10,7 @@ """Extractors for Wikimedia sites""" from .common import BaseExtractor, Message -from .. import text, exception +from .. import text, util, exception from ..cache import cache @@ -19,6 +19,7 @@ class WikimediaExtractor(BaseExtractor): basecategory = "wikimedia" filename_fmt = "{filename} ({sha1[:8]}).{extension}" archive_fmt = "{sha1}" + useragent = util.USERAGENT_GALLERYDL request_interval = (1.0, 2.0) def __init__(self, match):