[common] implement '"user-agent": "+PRESET"'

support using a 'User-Agent' header preset, e.g. "+firefox"
This commit is contained in:
Mike Fährmann
2026-01-03 19:23:50 +01:00
parent c745a57bd7
commit 2cfe2b3b04
2 changed files with 23 additions and 3 deletions

View File

@@ -817,15 +817,24 @@ Default
Example
* ``"curl/8.14.1"``
* ``"browser"``
* ``"@chrome"``
* ``"+chrome"``
* ``"@/opt/ChromeBrowser/bin/chrome"``
Description
User-Agent header value used for HTTP requests.
Setting this value to ``"browser"`` will try to automatically detect
and use the ``User-Agent`` header of the system's default browser.
Setting this value to ``"@BROWSER"``, e.g. ``"@chrome"``, will try to automatically detect
and use the ``User-Agent`` header of this installed browser.
| Starting this value with a ``+``
will use the latest ``User-Agent`` header of this preset target,
e.g. ``"+ff"``.
| (Supported values:
``firefox`` | ``ff`` | ``chrome`` | ``cr`` | ``gallery-dl`` | ``gdl``)
| Starting this value with an ``@``
will try to automatically detect and use the ``User-Agent`` header
of this installed browser,
| e.g. ``"@C:/Program Files/Zen Browser/zen-browser.exe"``.
extractor.*.browser