Thread: Calibre recipes
View Single Post
Old 07-05-2008, 11:33 PM   #21
ddavtian
Addict
ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.
 
Posts: 262
Karma: 332
Join Date: Nov 2003
Location: San Francisco, USA
Device: Sony 505 & 900, Kindle DX, Samsung Galaxy Tab, EVO
Quote:
Originally Posted by kovidgoyal View Post
Your return statement should be:
Code:
return [('Today\'s Paper', articles)]
You had said this 3 weeks ago and I didn't get it then :-(

I tried it and got a new error:
Traceback (most recent call last):
File "convert_from.py", line 61, in <module>
File "convert_from.py", line 42, in main
File "calibre\web\feeds\main.pyo", line 128, in run_recipe
File "calibre\web\feeds\news.pyo", line 825, in __init__
File "calibre\ebooks\lrf\web\profiles\__init__.pyo" , line 174, in __init__
File "calibre\ebooks\lrf\web\profiles\__init__.pyo" , line 204, in build_index
AttributeError: 'list' object has no attribute 'keys'

I put few print statements to track the flow, it never gets into this loop:
for item in soup.findAll('a', attrs={'class':'bold80'}):


I checked the web page, nothing was changed there. Articles are identifed correctly. Here is a link from the source code:
<a class="bold80" href="/article/SB121521047990229423.html?mod=todays_us_page_one">

Kovid, your help is very much appreciated.
Thanks in advance.
ddavtian is offline   Reply With Quote