84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
新手用python2.7写的一个scrapy爬虫,希望爬虫退出去的时候清理打开的firefox进程,发现不管用,请帮忙看下,为什么最下面的self.browser.quit不执行呢
def __init__(self): self.browser = webdriver.Firefox() def __del__(self): self.browser.quit()
ringa_lee
def spider_closed(self, spider): dosomething()
It seems that in scrapy you will be advised to do this scrapy: Call a function when a spider quits
It seems that in scrapy you will be advised to do this scrapy: Call a function when a spider quits