Merge branch 'master' of github.com:internetarchive/brozzler

This commit is contained in:
Barbara Miller 2020-12-02 14:34:30 -08:00
commit 6290692ac4
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
'''
brozzler/chrome.py - manages the chrome/chromium browser for brozzler
Copyright (C) 2014-2016 Internet Archive
Copyright (C) 2014-2020 Internet Archive
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -135,7 +135,7 @@ class Chrome:
return cookie_db
def start(self, proxy=None, cookie_db=None, disk_cache_dir=None,
disk_cache_size=None):
disk_cache_size=None, websocket_timeout=60):
'''
Starts chrome/chromium process.
@ -149,6 +149,7 @@ class Chrome:
is inside `self._home_tmpdir` (default None).
disk_cache_size: Forces the maximum disk space to be used by the disk
cache, in bytes. (default None)
websocket_timeout: websocket timeout, in seconds
Returns:
websocket url to chrome window with about:blank loaded
'''
@ -200,10 +201,9 @@ class Chrome:
self._out_reader_thread.start()
self.logger.info('chrome running, pid %s' % self.chrome_process.pid)
return self._websocket_url()
return self._websocket_url(timeout_sec=websocket_timeout)
def _websocket_url(self):
timeout_sec = 600
def _websocket_url(self, timeout_sec = 60):
json_url = 'http://localhost:%s/json' % self.port
# make this a member variable so that kill -QUIT reports it
self._start = time.time()

View File

@ -32,7 +32,7 @@ def find_package_data(package):
setuptools.setup(
name='brozzler',
version='1.5.23',
version='1.5.24',
description='Distributed web crawling with browsers',
url='https://github.com/internetarchive/brozzler',
author='Noah Levitt',