handle_html 函数返回 Element 或者 None,page_parser.py 没有处理 None 的情况
'NoneType' object has no attribute 'xpath'
Traceback (most recent call last):
File "C:\Users\zw\miniconda3\lib\site-packages\weibo_spider\spider.py", line 178, in get_weibo_info
weibos, self.weibo_id_list, to_continue = PageParser(
File "C:\Users\zw\miniconda3\lib\site-packages\weibo_spider\parser\page_parser.py", line 47, in __init__
info = self.selector.xpath("//div[@class='c']")
AttributeError: 'NoneType' object has no attribute 'xpath'
handle_html 函数返回 Element 或者 None,
page_parser.py
没有处理 None 的情况