Quote:
Originally Posted by Steven630
Sorry that I've posted so many questions here recently. I'm trying to make a recipe using beautifulsoup. But when I use findAll to find all the articles, only the first article was found. There's otherwise no problem with the recipe
Update: The latest version of Calibre has solved the problem. Many thanks to the author, who fixed the bug and NotTaken, who provided a way to get around the issue in the old version.
|
I still have this problem like this
Code:
for section in soup.findAll(attrs={'class':['topnews','left','right']}):
section_title = self.tag_to_string(section.findAll(['span','h2']))
and then i got the error,I dont know why.
AttributeError: 'ResultSet' object has no attribute 'contents'
If I changed
section.findAll() into
section.find(),it's ok,but only downloaded the first article what was found.