make it easier to disable default 'browser' settings

Previously it was necessary to set 'browser' to a non-empty, non-string
value to disable any default 'browser' value.
Now '-o browser=' or '-o browser=false' is enough.
This commit is contained in:
Mike Fährmann 2022-07-07 11:17:43 +02:00
parent 92b75bcdce
commit e4f48cc810
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -225,7 +225,9 @@ class Extractor():
headers.clear()
ssl_options = ssl_ciphers = 0
browser = self.config("browser") or self.browser
browser = self.config("browser")
if browser is None:
browser = self.browser
if browser and isinstance(browser, str):
browser, _, platform = browser.lower().partition(":")