I'm using Calibre to download feeds from various news sources and to send them to my kindle. I was wondering if it is possible to use a custom recipe to download only articles that have a "magic" keyword in their title or content. For the title is quite simple if you use a custom recipe and override the parse_feeds
method:
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1425579653(BasicNewsRecipe):
title = 'MY_TITLE'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
feeds = [
('MY_TITLE', 'MY_FEED_URL'),
]
def parse_feeds(self):
feeds = BasicNewsRecipe.parse_feeds(self)
for feed in feeds:
for article in feed.articles[:]:
if 'MY_MAGIC_KEYWORD' not in article.title.upper():
feed.articles.remove(article)
return feeds
But since I don't have access to feed.content
in the parse_feeds
method I was wondering if there is another way of doing this for the article content.