View Single Post
Old 02-04-2011, 11:53 PM   #10
joeindallas
Enthusiast
joeindallas began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2011
Device: Kindle 3
Here's what I did to get the cowboys, rangers, and mavericks from the DMN site. I had much less luck with the DMN recipe itself:

Spoiler:
import re
from calibre.web.feeds.recipes import BasicNewsRecipe


class AdvancedUserRecipe1295487944(BasicNewsRecipe):
title = u'DMN Team RSS Sports Feeds'
oldest_article = 7
max_articles_per_feed = 100

no_stylesheets = True
extra_css = '''
h1{text-align:left;font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
h2{text-align:left;font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
p{text-align:left;font-family:Arial,Helvetica,sans-serif;font-size:small;}
body{text-align:left;font-family:Helvetica,Arial,sans-serif;font-size:small;}
'''

remove_tags = [dict(name='div', attrs={'class':'categoryGroup'})]
remove_tags.append(dict(name = 'div', attrs = {'class': 'archivesGroup'}))

feeds = [(u'Rangers RSS', u'http://rangersblog.dallasnews.com/index.xml'), (u'Mavericks RSS', u'http://mavsblog.dallasnews.com/index.xml'), (u'Cowboys RSS', u'http://cowboysblog.dallasnews.com/index.xml')]

joeindallas is offline   Reply With Quote