[wikimedia] use 'gallery-dl/<version>' User-Agent (#8770 #8861)

This commit is contained in:
Mike Fährmann
2026-01-10 17:42:56 +01:00
parent 76930ad44c
commit 7e513f35f2
2 changed files with 4 additions and 2 deletions

View File

@@ -803,6 +803,7 @@ Default
* ``[Danbooru]``
* ``mangadex``
* ``weasyl``
* ``[wikimedia]``
* ``zerochan``
``"gallery-dl/VERSION (by mikf)"``
* ``[E621]``

View File

@@ -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):