#解析
class Parser:
def
#数据处理
class DataOutPut:
def save(safe, data):
#调度
class DiaoDu:
def init(self):
self.downloader = Downloader()
self.url_manager = URLManager()
self.parser = Parser()
self.data_saver = DataOutPut()
def run(self,url):
self.url_manager.add_new_url(url)
url = self.url_manager.get_new_url()
while salf.url_manager.has_new_url():
html = self.downloader.download(url)
data_urls = self.parser.parse(html)
self.data_saver.save(data)
self.url_manager.add_new_urls(urls)