2
後,我完成運行以下Python
代碼:正確端接硒瀏覽器在Python
Linux
機
from selenium.webdriver import Firefox
from contextlib import closing
with closing(Firefox()) as browser:
# some code here
目前還有聽geckodriver過程。
$ ss -arp
LISTEN 0 128 localhost:44132 *:* users:(("geckodriver",21698,3))
LISTEN 0 128 localhost:57893 *:* users:(("geckodriver",20242,3))
LISTEN 0 128 localhost:34439 *:* users:(("geckodriver",19440,3))
LISTEN 0 128 localhost:35435
如何調整Python
代碼,以便它也終止進程?