mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 00:29:53 -05:00
Merge pull request #94 from vbanos/json-compact
Send more compact JSON to browser
This commit is contained in:
commit
b438cdd33e
@ -228,7 +228,7 @@ class WebsockReceiverThread(threading.Thread):
|
||||
self.websock.send(
|
||||
json.dumps(dict(
|
||||
id=0, method='Page.handleJavaScriptDialog',
|
||||
params={'accept': accept})))
|
||||
params={'accept': accept}), separators=',:'))
|
||||
|
||||
def _handle_message(self, websock, json_message):
|
||||
message = json.loads(json_message)
|
||||
@ -315,7 +315,7 @@ class Browser:
|
||||
def send_to_chrome(self, suppress_logging=False, **kwargs):
|
||||
msg_id = next(self._command_id)
|
||||
kwargs['id'] = msg_id
|
||||
msg = json.dumps(kwargs)
|
||||
msg = json.dumps(kwargs, separators=',:')
|
||||
logging.log(
|
||||
brozzler.TRACE if suppress_logging else logging.DEBUG,
|
||||
'sending message to %s: %s', self.websock, msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user