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
代码,以便它也终止进程?