support selecting a domain for '--cookies-from-browser'

for example 'gallery-dl --cookies-from-browser firefox/twitter.com'
This commit is contained in:
Mike Fährmann
2023-05-05 21:32:18 +02:00
parent 3ca5dac8b6
commit a14b63d941
5 changed files with 61 additions and 27 deletions

View File

@@ -446,12 +446,13 @@ Description
* The optional second entry is a profile name or an absolute path to a profile directory
* The optional third entry is the keyring to retrieve passwords for decrypting cookies from
* The optional fourth entry is a (Firefox) container name (``"none"`` for only cookies with no container)
* The optional fifth entry is the domain to extract cookies for. Prefix it with a dot ``.`` to include cookies for subdomains. Has no effect when also specifying a container.
.. code:: json
["firefox"]
["firefox", null, null, "Personal"]
["chromium", "Private", "kwallet"]
["chromium", "Private", "kwallet", null, ".twitter.com"]
extractor.*.cookies-update

View File

@@ -19,11 +19,12 @@
--clear-cache MODULE Delete cached login sessions, cookies, etc. for
MODULE (ALL to delete everything)
--cookies FILE File to load additional cookies from
--cookies-from-browser BROWSER[+KEYRING][:PROFILE][::CONTAINER]
--cookies-from-browser BROWSER[/DOMAIN][+KEYRING][:PROFILE][::CONTAINER]
Name of the browser to load cookies from, with
optional keyring name prefixed with '+', profile
prefixed with ':', and container prefixed with
'::' ('none' for no container)
optional domain prefixed with '/', keyring name
prefixed with '+', profile prefixed with ':',
and container prefixed with '::' ('none' for no
container)
## Output Options:
-q, --quiet Activate quiet mode