Merge branch 'ARI-5995-too' into qa

This commit is contained in:
Barbara Miller 2019-12-09 17:50:24 -08:00
commit bb45419de4
5 changed files with 17 additions and 7 deletions

View File

@ -1,4 +1,4 @@
.. image:: https://travis-ci.org/internetarchive/brozzler.svg
.. image:: https://api.travis-ci.org/internetarchive/brozzler.svg?branch=master
:target: https://travis-ci.org/internetarchive/brozzler
.. |logo| image:: https://cdn.rawgit.com/internetarchive/brozzler/1.1b12/brozzler/dashboard/static/brozzler.svg

View File

@ -25,7 +25,7 @@
interval: 1000
actions:
- selector: a[data-testid="snapshot_footer_link"]
childSelector: i[class="_271o img sp_-vbjDsgypf1 sx_1de63f"]
childSelector: i[class="_271o img sp_KBE8sh--02o sx_5d0205"]
closeSelector: 'div._7lq1 > button'
-
url_regex: '^https?://(?:www\.)?facebook\.com/.*$'
@ -39,7 +39,7 @@
url_regex: '^https?://(?:www\.)?instagram\.com/.*$'
behavior_js_template: umbraBehavior.js.j2
default_parameters:
interval: 500
interval: 2000
actions:
- selector: .glyphsSpriteGrey_Close
rmSelector: '.RnEpo'

View File

@ -177,6 +177,9 @@ class Chrome:
'--disable-web-security', '--disable-notifications',
'--disable-extensions', '--disable-save-password-bubble']
extra_chrome_args = os.environ.get('BROZZLER_EXTRA_CHROME_ARGS')
if extra_chrome_args:
chrome_args.extend(extra_chrome_args.split())
if disk_cache_dir:
chrome_args.append('--disk-cache-dir=%s' % disk_cache_dir)
if disk_cache_size:

View File

@ -43,13 +43,20 @@ class JobValidator(cerberus.Validator):
return url.scheme in ('http', 'https', 'ftp')
class InvalidJobConf(Exception):
def __init__(self, errors):
self.errors = errors
def __init__(self, validator):
self.errors = validator.errors
try:
# Cerberus does a nice job hiding the bad value. In the case I
# debugged, I found it here. Maybe there's a better way to see it.
value = validator._errors[0].info[0][0].info[0][0].value
self.errors['bad value'] = value
except:
value = None
def validate_conf(job_conf, schema=load_schema()):
v = JobValidator(schema)
if not v.validate(job_conf, normalize=False):
raise InvalidJobConf(v.errors)
raise InvalidJobConf(v)
def merge(a, b):
if isinstance(a, dict) and isinstance(b, dict):

View File

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