新手用python2.7写的一个scrapy爬虫,希望爬虫退出去的时候清理打开的firefox进程,发现不管用,请帮忙看下,为什么最下面的self.browser.quit不执行呢
def __init__(self):
self.browser = webdriver.Firefox()
def __del__(self):
self.browser.quit()
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
似乎在scrapy中会建议你这么做scrapy: Call a function when a spider quits