shot-scraper
shot-scraper copied to clipboard
add more ways to configure web browser from command-line
- option to use system browser
- option to add custom browser command-line arguments
- option to ignore https headers
:books: Documentation preview :books:: https://shot-scraper--91.org.readthedocs.build/en/91/
This is an interesting set of improvements.
I couldn't get the --system-browser
option to work on macOS - do you know if there's a way to use it there?
I tried these:
>>> distutils.spawn.find_executable('Chrome')
>>> distutils.spawn.find_executable('chrome')
>>> distutils.spawn.find_executable('Firefox')
>>> distutils.spawn.find_executable('Firefox.app')
>>> distutils.spawn.find_executable('firefox')
None returned a path.
Does shutil.which
works on your platform ? It looks like a more suited replacement.
In [1]: import shutil
In [2]: shutil.which('chromium')
Out[3]: '/usr/bin/chromium'
Relevant: apparently distutils.spawn.find_executable
is deprecated and scheduled for removal in Python 3.12:
- https://github.com/aws/sagemaker-python-sdk/issues/3028
I'm now using shutil.which
in my branch, can you test if it now works on mac ?