from urllib import request class Spider(): url = 'https://www.panda.tv/cate/lol' def __fetch_content(self): r = request.urlopen(Spider.url) htmls = r.read() htmls = str(htmls,encoding='utf-8') def __analysis(self,htmls): pass def go(self): htmls = self.__fetch_content() self.__analysis(htmls) spider = Spider() spider.go()
E1111:Assigning to function call which doesn't return
请问下 htmls那边红色波浪直接报错 请问是哪里问题