Refresh a local web page using Python

后端 未结 5 1337
自闭症患者
自闭症患者 2021-01-04 12:24

I\'m using Python to gather some information, construct a very simple html page, save it locally and display the page in my browser using webbrowser.open(\'file:///c:/testfi

5条回答
  •  被撕碎了的回忆
    2021-01-04 13:12

    I use pyautogui module to refresh the browser page. It's one liner:

    import pyautogui
    
    pyautogui.hotkey('f5') #Simulates F5 key press = page refresh
    

提交回复
热议问题