Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more ways to configure web browser from command-line #91

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

looran
Copy link

@looran looran commented Oct 1, 2022

  • option to use system browser
  • option to add custom browser command-line arguments
  • option to ignore https headers

馃摎 Documentation preview 馃摎: https://shot-scraper--91.org.readthedocs.build/en/91/

@simonw
Copy link
Owner

simonw commented Oct 14, 2022

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.

@looran
Copy link
Author

looran commented Oct 15, 2022

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'

* option to use system browser
* option to add custom browser command-line arguments
* option to ignore https headers
@simonw
Copy link
Owner

simonw commented Oct 24, 2022

Relevant: apparently distutils.spawn.find_executable is deprecated and scheduled for removal in Python 3.12:

@looran
Copy link
Author

looran commented Oct 26, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants