From c618d8df9f8ecf239da73999f28877a0f6d1ac1a Mon Sep 17 00:00:00 2001 From: Pedro de Oliveira Guedes Date: Wed, 5 Jan 2022 15:11:49 -0300 Subject: [PATCH] Eval method improvements. --- api/chrome/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/chrome/cli.py b/api/chrome/cli.py index 9eb54a0..85f66a2 100644 --- a/api/chrome/cli.py +++ b/api/chrome/cli.py @@ -202,4 +202,6 @@ class Chrome: -> ? """ - return self.__request_raw_post__("/ipc/chrome/eval/"+id, command) \ No newline at end of file + raw_return = self.__request_raw_post__("/ipc/chrome/eval/"+id, command) + + return raw_return['result']['result']['value'] if ('value' in raw_return['result']['result']) else "" \ No newline at end of file