mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-09-29 15:31:08 -04:00
50 lines
2.2 KiB
Plaintext
50 lines
2.2 KiB
Plaintext
from calibre.web.feeds.news import BasicNewsRecipe
|
|
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
|
title = u'Birmingham post'
|
|
description = 'Author D.Asbury. News for Birmingham UK'
|
|
#timefmt = ''
|
|
# last update 8/9/12
|
|
__author__ = 'Dave Asbury'
|
|
cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/161987_9010212100_2035706408_n.jpg'
|
|
oldest_article = 2
|
|
max_articles_per_feed = 12
|
|
linearize_tables = True
|
|
remove_empty_feeds = True
|
|
remove_javascript = True
|
|
no_stylesheets = True
|
|
#auto_cleanup = True
|
|
language = 'en_GB'
|
|
|
|
|
|
masthead_url = 'http://www.pressgazette.co.uk/Pictures/web/t/c/g/birmingham_post.jpg'
|
|
|
|
|
|
keep_only_tags = [
|
|
dict(attrs={'id' : 'article-header'}),
|
|
#dict(name='h1',attrs={'id' : 'article-header'}),
|
|
dict(attrs={'class':['article-meta-author','article-meta-date','article main','art-o art-align-center otm-1 ']}),
|
|
dict(name='div',attrs={'class' : 'article-image full'}),
|
|
dict(attrs={'clas' : 'art-o art-align-center otm-1 '}),
|
|
dict(name='div',attrs={'class' : 'article main'}),
|
|
#dict(name='p')
|
|
#dict(attrs={'id' : 'three-col'})
|
|
]
|
|
remove_tags = [
|
|
# dict(name='div',attrs={'class' : 'span-33 last header-links'})
|
|
|
|
]
|
|
feeds = [
|
|
#(u'News',u'http://www.birminghampost.net/news/rss.xml'),
|
|
(u'West Mids. News', u'http://www.birminghampost.net/news/west-midlands-news/rss.xml'),
|
|
(u'UK News', u'http://www.birminghampost.net/news/uk-news/rss.xml'),
|
|
(u'Sports',u'http://www.birminghampost.net/midlands-birmingham-sport/rss.xml'),
|
|
(u'Bloggs & Comments',u'http://www.birminghampost.net/comment/rss.xml')
|
|
|
|
]
|
|
extra_css = '''
|
|
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;text-align:center;}
|
|
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
|
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
|
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
|
'''
|