Thread: Calibre recipes
View Single Post
Old 04-25-2009, 05:51 PM   #46
pghaworth
Fervent Pleasure Seeker
pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.pghaworth ought to be getting tired of karma fortunes by now.
 
pghaworth's Avatar
 
Posts: 1,220
Karma: 712073
Join Date: Feb 2009
Location: The Windmills of My Mind
Device: Clara HD
Need help revising recipe please

I'm trying to revise the Fibro recipe to get news on another specific topic but it's kicking back the changes. I think I know what the problem is, but that's the name of the feed unless the issue is elsewhere. It won't even let me save it as a recipe. May I get some help please.

Here is the recipe

#!/usr/bin/env python

__license__ = 'GPL v3'
__copyright__ = '2009, Darko Miletic <xxxxxxxxxxxxx>'
'''
sciencedaily.com
'''
from calibre.web.feeds.news import BasicNewsRecipe

class ScienceDailySpec(BasicNewsRecipe):
title = 'ScienceDaily - Alzheimer's'
__author__ = 'Darko Miletic'
description = "Breaking science news and articles on global warming, extrasolar planets, stem cells, bird flu, autism, nanotechnology, dinosaurs, evolution -- the latest discoveries in astronomy, anthropology, biology, chemistry, climate &amp; environment, computers, engineering, health &amp; medicine, math, physics, psychology, technology, and more -- from the world's leading universities and research organizations."
oldest_article = 10000
language = _('English')
max_articles_per_feed = 1000
no_stylesheets = True
use_embedded_content = False

keep_only_tags = [
dict(name='h1', attrs={'class':'story'})
,dict(name='div', attrs={'id':'story'})
]

remove_tags_after = dict(name='div', attrs={'id':'citationbox'})
remove_tags = [
dict(name='div', attrs={'id':'seealso'})
,dict(name='div', attrs={'id':'citationbox'})
]

feeds = [(u"Alzheimer's Research News", u'http://www.sciencedaily.com/rss/health_medicine/alzheimer's.xml')]


The only thing I changed was the title and the feed info. I think the apostrophe in the feed line is creating the issue but don't know enough to be sure. Problem comes in because that is the name of the feed.

Also, please note, in the recipe the part including and after the apostrophe on the feed line is black as opposed to ochre/yellow. Screenshot included. Thanks.

Forgot to mention, I need to add one more feed to the feeds and don't know how to do that. A quick explanation would help.
Attached Images
File Type: bmp Alzheimers.bmp (576.1 KB, 335 views)

Last edited by pghaworth; 04-25-2009 at 05:57 PM.
pghaworth is offline   Reply With Quote