Washington Times....
Once again I bow to the gurus! I could use some help on the Washington times recipe. I cobbled this one together below and it worked for quite some time, but now the Washington times has changed their format for their page..... any assistance would be greatly apperciated.
__license__ = 'GPL v3'
'''
washingtontimes.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class WashingtonTimes(BasicNewsRecipe):
title = 'Washington Times'
__author__ = 'Kos Semonski'
description = 'Daily newspaper'
publisher = 'News World Communications, Inc.'
category = 'news, politics, USA'
oldest_article = 2
max_articles_per_feed = 15
no_stylesheets = True
encoding = 'utf8'
use_embedded_content = False
language = 'en'
masthead_url = 'http://media.washingtontimes.com/media/img/TWTlogo.gif'
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
}
def get_feeds(self):
return [(u'Headlines', u'http://www.washingtontimes.com/rss/headlines/news/headlines/'),
(u'Editor Favs', u'http://www.washingtontimes.com/rss/headlines/news/editor-favorites/'),
(u'Politics', u'http://www.washingtontimes.com/rss/headlines/news/politics/'),
(u'National', u'http://www.washingtontimes.com/rss/headlines/news/national/'),
(u'World', u'http://www.washingtontimes.com/rss/headlines/news/world/'),
(u'Business', u'http://www.washingtontimes.com/rss/headlines/news/business/'),
(u'Technology', u'http://www.washingtontimes.com/rss/headlines/news/technology/'),
(u'Editorials', u'http://www.washingtontimes.com/rss/headlines/opinion/editorials/')
]
def print_version(self, url):
return url + '/print/'
|