Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 735747ab20
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (49 sloc) 1.954 kb
from import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
class DenverPost(BasicNewsRecipe):
title = u'Denver Post'
language = 'en'
__author__ = 'Krittika Goyal'
oldest_article = 1 #days
max_articles_per_feed = 20
conversion_options = {'linearize_tables':True}
no_stylesheets = True
#remove_tags_before = dict(name='h1', attrs={'class':'heading'})
#remove_tags_after = dict(name='td', attrs={'class':'newptool1'})
remove_tags = [
dict(name='img', src=lambda x: not x or '/tracking/' in x),
dict(name='span', attrs={'fd-id':True}),
dict(name='div', attrs={'class':['articleOptions', 'articlePosition2']}),
#dict(name='div', attrs={'id':['qrformdiv', 'inSection', 'alpha-inner']}),
#dict(name='ul', attrs={'class':'article-tools'}),
#dict(name='ul', attrs={'class':'articleTools'}),
feeds = [
('Top Stories',
def preprocess_html(self, soup):
story = soup.find(name='td', attrs={'class':'articleBox'})
#td = heading.findParent(name='td')
soup = BeautifulSoup('<html><head><title>t</title></head><body></body></html>')
body = soup.find(name='body')
body.insert(0, story) = 'div'
for img in soup.findAll(name='img', style='visibility:hidden;'):
del img['style']
for div in soup.findAll(id='caption', style=True):
del div['style']
return soup
Jump to Line
Something went wrong with that request. Please try again.