def start(self): if self.filePath.get() == '' or self.outputPath.get() == '': tkinter.messagebox._show("Error", message="please select a keyword file and output path!") return spider = Spider() spider.readKeyWord(filePath=self.filePath) spider.searchKeyWord() spider.createResultExcel(outputFilePath=self.outputPath) tkinter.messagebox._show("Success", message="已经完成了爬取!")