Kovid and Darko —
I am not skilled in recipes, and I believe I am doing something incorrect. What I wish to do is edit the UK papers' recipes to omit all categories except sport. (I am cricket and football fan living in the States.) However, when I try to edit the recipes, Calibre does not download anything. I first tried this with the Daily Mail to no success.
Is there something I must do besides eliminating the code for other sections I do not want?
This is what I reduced the code to:
from calibre.web.feeds.news import BasicNewsRecipe
class TheDailyMail(BasicNewsRecipe):
title = u'The Daily Mail'
oldest_article = 2
language = _('English')
author = 'RufusA'
simultaneous_downloads= 1
max_articles_per_feed = 50
extra_css = 'h1 {text-align: left;}'
remove_tags = [ dict(name='ul', attrs={'class':'article-icons-links'}) ]
remove_tags_after = dict(name='h3', attrs={'class':'social-links-title'})
remove_tags_before = dict(name='div', attrs={'id':'content'})
no_stylesheets = True
feeds = [
(u'Sport', u'http://www.dailymail.co.uk/sport/index.rss')]
def print_version(self, url):
main = url.partition('?')[0]
return main + '?printingPage=true'
However, nothing occurs when I try to download the information.
Thanks. Cheers.
|