Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
解决 'NoneType' object has no attribute 'xpath'
handle_html 函数返回 Element 或者 None,`page_parser.py` 没有处理 None 的情况 ```py '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' ```
- Loading branch information