Skip to content

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.

2 participants