mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-03 19:04:37 +01:00
Fix NoneType Bug
Skip Null node of ul
This commit is contained in:
parent
2a29924408
commit
9df2d5dbe5
1 changed files with 2 additions and 0 deletions
|
|
@ -116,6 +116,8 @@ def parse_section(self, url):
|
|||
soup = self.index_to_soup(url)
|
||||
ul = soup.find(attrs={'class': 'list'})
|
||||
current_articles = []
|
||||
if ul is None :
|
||||
return current_articles
|
||||
for li in ul.findAll('li'):
|
||||
a = li.find('a', href=True)
|
||||
title = li.find('p', text=True).strip()
|
||||
|
|
|
|||
Loading…
Reference in a new issue