From 0a569f872c09a4dee54ca07ef765927e4d558b6a Mon Sep 17 00:00:00 2001 From: Mufanc <47652878+Mufanc@users.noreply.github.com> Date: Wed, 15 Dec 2021 16:33:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=BC=E4=B9=8E=E4=BF=AE=E5=A4=8D=E3=80=8CKe?= =?UTF-8?q?yError:=20courseId=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- automaton/devtools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automaton/devtools.py b/automaton/devtools.py index 1b62163..86fe222 100644 --- a/automaton/devtools.py +++ b/automaton/devtools.py @@ -64,6 +64,8 @@ class Browser(object): pages = (await client.get(f'http://127.0.0.1:{self.port}/json')).json() for page in pages: params = dict(parser.parse_qsl(parser.urlsplit(page['url']).query)) + if 'courseId' not in params: + continue if 'bookId' in params: return params['courseId'], params['bookId'] return params['courseId'], None