| 1 |
__license__ = 'GPL v3' |
| 2 |
__copyright__ = '2010-2011, Darko Miletic <darko.miletic at gmail.com>' |
| 3 |
''' |
| 4 |
smh.com.au |
| 5 |
''' |
| 6 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 7 |
|
| 8 |
|
| 9 |
class Smh_au(BasicNewsRecipe): |
| 10 |
title = 'The Sydney Morning Herald' |
| 11 |
__author__ = 'Darko Miletic' |
| 12 |
description = ( |
| 13 |
'Breaking news from Sydney, Australia and the world. Features the latest business, sport, entertainment, travel, lifestyle, and technology news.' # noqa: E501 |
| 14 |
) |
| 15 |
publisher = 'Fairfax Digital' |
| 16 |
category = 'news, politics, Australia, Sydney' |
| 17 |
oldest_article = 2 |
| 18 |
max_articles_per_feed = 200 |
| 19 |
no_stylesheets = True |
| 20 |
ignore_duplicate_articles = {'title', 'url'} |
| 21 |
use_embedded_content = False |
| 22 |
encoding = 'utf-8' |
| 23 |
|
| 24 |
language = 'en_AU' |
| 25 |
remove_empty_feeds = True |
| 26 |
masthead_url = 'http://images.smh.com.au/2010/02/02/1087188/smh-620.jpg' |
| 27 |
publication_type = 'newspaper' |
| 28 |
|
| 29 |
keep_only_tags = [dict(name='article')] |
| 30 |
remove_tags = [ |
| 31 |
dict(name=['button']), |
| 32 |
dict(id=['saveTooltip']), |
| 33 |
dict(attrs={'class': 'noPrint'}), |
| 34 |
] |
| 35 |
|
| 36 |
# https://www.smh.com.au/rssheadlines |
| 37 |
feeds = [ |
| 38 |
('Latest News', 'https://www.smh.com.au/rss/feed.xml'), |
| 39 |
('Federal Politics', 'https://www.smh.com.au/rss/politics/federal.xml'), |
| 40 |
('NSW News', 'https://www.smh.com.au/rss/national/nsw.xml'), |
| 41 |
('World', 'https://www.smh.com.au/rss/world.xml'), |
| 42 |
('National', 'https://www.smh.com.au/rss/national.xml'), |
| 43 |
('Business', 'https://www.smh.com.au/rss/business.xml'), |
| 44 |
('Culture', 'https://www.smh.com.au/rss/culture.xml'), |
| 45 |
('Technology', 'https://www.smh.com.au/rss/technology.xml'), |
| 46 |
('Environment', 'https://www.smh.com.au/rss/environment.xml'), |
| 47 |
('Lifestyle', 'https://www.smh.com.au/rss/lifestyle.xml'), |
| 48 |
('Property', 'https://www.smh.com.au/rss/property.xml'), |
| 49 |
('Sport', 'https://www.smh.com.au/rss/sport.xml'), |
| 50 |
('Ruby League', 'https://www.smh.com.au/rss/sport/nrl.xml'), |
| 51 |
('AFL', 'https://www.smh.com.au/rss/sport/afl.xml'), |
| 52 |
] |