I am trying to get the Providence Journal at
www.projo.com but am not getting any articles. Any advice would be greatly appreciated. Here is my Recipe:
import re
from calibre.web.feeds.news import BasicNewsRecipe
class ProvidenceJournal(BasicNewsRecipe):
title = 'Providence Journal'
description = 'RI news'
__author__ = 'Kovid Goyal and Sujata Raman'
use_embedded_content = False
max_articles_per_feed = 20
language = 'en'
remove_javascript = True
no_stylesheets = True
extra_css = '''
#articleCopyright { font-family:Arial,helvetica,sans-serif ; font-weight:bold ; font-size:x-small ;}
p { font-family:"Times New Roman",times,serif ; font-weight:normal ; font-size:small ;}
body{font-family:arial,helvetica,sans-serif}
'''
feeds = [ ('Today\'s Highlights', 'http://www.projo.com/newskiosk/rss/projolocalnews.xml'),
('Politics', 'http://politicsblog.projo.com/index.xml'),
('7 to 7: Rhode Island\'s breaking news blog', 'http://newsblog.projo.com/index.xml'),
('Music', 'http://www.projo.com/newskiosk/rss/projomusic.xml')
]
remove_tags = [{'id':['pfmnav', 'ArticleCommentsWrapper']}]
def get_article_url(self, article):
return article.get('guid', article.get('link', None))
def print_version(self, url):
return url.rpartition('.')[0] + '_pf.html'
def postprocess_html(self, soup, first):
for div in soup.findAll(name='div', style=re.compile('margin')):
div['style'] = ''
return soup