beautifulsoup4 报错'NoneType' object has no attribute 'text' 求解决

代码如下,查看过网页,属性值应该没错;
print过url也没错;

soup = BeautifulSoup(self.current_session.get(self.get_english_first_page_url()).content,'lxml')
count_line = soup.find('div',class_ ='total_count').text
m = re.search(u'第1/(\d{1})页', count_line)
return int(m.groups()[0])


不好意思,想问一下你贴的代码在哪里@@