From d566cdadfee556c042c4ffc65a03dc77c61cf9c7 Mon Sep 17 00:00:00 2001 From: Shikonin Date: Fri, 4 Aug 2023 23:42:53 +0800 Subject: [PATCH] Update run.py change fontface render --- run.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/run.py b/run.py index eb2b9ad..03f3061 100644 --- a/run.py +++ b/run.py @@ -54,9 +54,11 @@ browser.close() sys.exit('You have tried to read this from too many computers or web browsers recently, and will need to wait up to 24 hours before returning to this book.') - # retrieve fonts - font_style = page.locator('#fontfaces').inner_html() - + # retrieve fonts + try: + font_style = page.locator('#fontfaces').inner_html() + except: + font_style = "" # open display menu page.locator('.icon-ic_displaysettings').wait_for(state='visible') page.evaluate("() => document.querySelector('.icon-ic_displaysettings').click()")