mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improve daily telegraph
This commit is contained in:
parent
d82ad7af94
commit
79396b00f4
@ -6,20 +6,50 @@ __docformat__ = 'restructuredtext en'
|
|||||||
'''
|
'''
|
||||||
http://www.news.com.au/dailytelegraph/
|
http://www.news.com.au/dailytelegraph/
|
||||||
'''
|
'''
|
||||||
import re
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class DailyTelegraph(BasicNewsRecipe):
|
class DailyTelegraph(BasicNewsRecipe):
|
||||||
title = u'Daily Telegraph'
|
title = u'Daily Telegraph'
|
||||||
__author__ = u'AprilHare'
|
__author__ = u'Adrian G.'
|
||||||
language = 'en_AU'
|
language = 'en_AU'
|
||||||
|
|
||||||
description = u'News from down under'
|
description = u'Daily Telegraph News'
|
||||||
oldest_article = 2
|
oldest_article = 5
|
||||||
max_articles_per_feed = 10
|
max_articles_per_feed = 100
|
||||||
remove_tags_before = dict(name='div', attrs={'class':'article-title'})
|
no_stylesheets = True
|
||||||
remove_tags = [dict(attrs={'class':['article-source', 'article-tools']})]
|
use_embedded_content = False
|
||||||
remove_tags_after = dict(attrs={'class':re.compile('share-article')})
|
no_javascript = True
|
||||||
|
|
||||||
|
|
||||||
|
timefmt = ' [%A, %d %B, %Y]'
|
||||||
|
encoding = 'utf-8'
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs ={'id':'story'})]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h1{font-family:Georgia,"Times New Roman",Times,serif; font-weight:bold; font-size:large;}
|
||||||
|
.cT-storyDetails{font-family:Arial,Helvetica,sans-serif; color:#666666;font-size:x-small;}
|
||||||
|
.articleBody{font-family:Arial,Helvetica,sans-serif; color:black;font-size:small;}
|
||||||
|
.cT-imageLandscape{font-family:Arial,Helvetica,sans-serif; color:#333333 ;font-size:x-small;}
|
||||||
|
.source{font-family:Arial,Helvetica,sans-serif; color:#333333 ;font-size:xx-small;}
|
||||||
|
#content{font-family:Arial,Helvetica,sans-serif;font-size:x-small;}
|
||||||
|
.pageprint{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
||||||
|
#bylineDetails{font-family:Arial,Helvetica,sans-serif; color:#666666;font-size:x-small;}
|
||||||
|
.featurePic-wide{font-family:Arial,Helvetica,sans-serif;font-size:x-small;}
|
||||||
|
#idfeaturepic{font-family:Arial,Helvetica,sans-serif;font-size:x-small;}
|
||||||
|
h3{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
|
||||||
|
h2{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
|
||||||
|
h4{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
|
||||||
|
h5{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
|
||||||
|
body{font-family:Arial,Helvetica,sans-serif; font-size:x-small;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='div', attrs ={'id':['comments','story-related-coverage']}),
|
||||||
|
dict(name='div', attrs ={'class':['story-header-tools','story-footer','story-extras','story-related']}),
|
||||||
|
dict(name='div', attrs ={'class':['promo-image','story-extras story-extras-2']}),
|
||||||
|
dict(name='div', attrs ={'class':['assistive sidebar-jump']})
|
||||||
|
]
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Top Stories', u'http://feeds.news.com.au/public/rss/2.0/dtele_top_stories_253.xml'),
|
(u'Top Stories', u'http://feeds.news.com.au/public/rss/2.0/dtele_top_stories_253.xml'),
|
||||||
@ -36,13 +66,6 @@ class DailyTelegraph(BasicNewsRecipe):
|
|||||||
(u'Confidential News', u'http://feeds.news.com.au/public/rss/2.0/dtele_entertainment_confidential_252.xml'),
|
(u'Confidential News', u'http://feeds.news.com.au/public/rss/2.0/dtele_entertainment_confidential_252.xml'),
|
||||||
(u'Confidential Biographies', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_biographies_491.xml'),
|
(u'Confidential Biographies', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_biographies_491.xml'),
|
||||||
(u'Confidential Galleries', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_galleries_483.xml'),
|
(u'Confidential Galleries', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_galleries_483.xml'),
|
||||||
(u'Confidential In-depth', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_indepth_490.xml'),
|
|
||||||
(u'Confidential ShowBuzz', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_showbuzz_485.xml'),
|
|
||||||
(u'Sport', u'http://feeds.news.com.au/public/rss/2.0/dtele_sport_203.xml'),
|
|
||||||
(u'AFL', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_afl_341.xml'),
|
|
||||||
(u'Cricket', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_cricket_343.xml'),
|
|
||||||
(u'Horse Racing', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_horseracing_686.xml'),
|
|
||||||
(u'NRL', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_nrl_345.xml'),
|
|
||||||
(u'Rugby Union', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_rugby_union_342.xml'),
|
|
||||||
(u'Soccer', u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_soccer_344.xml')
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user