Skip to content

Commit

Permalink
Merge branch 'master' into ytdlp_last_refined_really
Browse files Browse the repository at this point in the history
  • Loading branch information
galgeek authored Jul 18, 2024
2 parents 5a264f2 + 34bd044 commit f1227ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion brozzler/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def check_version(chrome_exe):
"brozzler requires chrome/chromium version 64 or "
"later but %s reports version %s" % (chrome_exe, version_str)
)
return major_version


class Chrome:
Expand Down Expand Up @@ -182,7 +183,6 @@ def start(
chrome_args = [
self.chrome_exe,
"-v",
"--headless",
"--remote-debugging-port=%s" % self.port,
"--use-mock-keychain", # mac thing
"--user-data-dir=%s" % self._chrome_user_data_dir,
Expand All @@ -205,6 +205,13 @@ def start(
"--disable-save-password-bubble",
"--disable-sync",
]
major_version = check_version(self.chrome_exe)
if major_version >= 109:
chrome_args.append("--headless=new")
elif 96 <= major_version <= 108:
chrome_args.append("--headless=chrome")
else:
chrome_args.append("--headless")

extra_chrome_args = os.environ.get("BROZZLER_EXTRA_CHROME_ARGS")
if extra_chrome_args:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def find_package_data(package):

setuptools.setup(
name="brozzler",
version="1.5.50a1",
version="1.5.51",
description="Distributed web crawling with browsers",
url="https://github.com/internetarchive/brozzler",
author="Noah Levitt",
Expand Down

0 comments on commit f1227ba

Please sign in to comment.