Error: list index out of range
Traceback (most recent call last):
File "E:\weiboSpider.py", line 161, in extract_user_info
if selector.xpath("//div[@class='tip'][2]/text()")[0] == u'学习经历':
IndexError: list index out of range
Error: invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "E:\weiboSpider.py", line 254, in get_user
weibo_num = int(user_info[0][3:-1])
ValueError: invalid literal for int() with base 10: ''
Error: list index out of range Traceback (most recent call last): File "E:\weiboSpider.py", line 161, in extract_user_info if selector.xpath("//div[@class='tip'][2]/text()")[0] == u'学习经历': IndexError: list index out of range Error: invalid literal for int() with base 10: '' Traceback (most recent call last): File "E:\weiboSpider.py", line 254, in get_user weibo_num = int(user_info[0][3:-1]) ValueError: invalid literal for int() with base 10: ''