shot-scraper icon indicating copy to clipboard operation
shot-scraper copied to clipboard

add more ways to configure web browser from command-line

Open looran opened this issue 2 years ago • 4 comments

  • 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/

looran avatar Oct 01 '22 01:10 looran

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.

simonw avatar Oct 14 '22 19:10 simonw

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'

looran avatar Oct 15 '22 07:10 looran

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

simonw avatar Oct 24 '22 22:10 simonw

I'm now using shutil.which in my branch, can you test if it now works on mac ?

looran avatar Oct 26 '22 17:10 looran