[common] implement '"user-agent": "@BROWSER"' (#7947)

support automatically fetching the 'User-Agent' header
of a specific installed browser, e.g. "@firefox"
This commit is contained in:
Mike Fährmann
2025-08-07 20:22:16 +02:00
parent f2a58118eb
commit 16acfbd1e7
2 changed files with 15 additions and 5 deletions

View File

@@ -696,12 +696,19 @@ Default
* ``"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``
* ``"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:LATEST) Gecko/20100101 Firefox/LATEST"``: otherwise
Example
* ``"curl/8.14.1"``
* ``"browser"``
* ``"@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.
extractor.*.browser
-------------------