Thread: Calibre recipes
View Single Post
Old 07-09-2008, 11:21 AM   #28
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
No luck with WSJ so far.

When I use the posted recipe, I get an empty file. It does find articles (a = item.find('a')), but doesn't pass this condition: "if a and a.has_key('href'):".

When I remove this condition, it gets articles (I print titles and see all of them from the web page), but fails at the end:

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 134, in run_recipe
File "calibre\web\feeds\news.pyo", line 472, in download
File "calibre\web\feeds\news.pyo", line 578, in build_index
File "c:\docume~1\davidd~1\locals~1\temp\calibre_0.4.76 _j-dnk5_recipes\recipe0
.py", line 89, in parse_index
print title
File "encodings\cp437.pyo", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2026' in position
5: character maps to <undefined>
ddavtian is offline   Reply With Quote