7-5课里面html_parser解析器变量作用域的问题
parse方法里面有一个soup对象
soup = BeautifulSoup(page_url, 'html.parser', from_encoding='utf-8')
在另一个内部方法 _get_new_data 调用的soup对象是那里来的
links = soup.find_all('a', html=re.compile(r'^/item/.*'))
我这个soup提示:Unresolved reference 'soup'