| 1 |
__license__ = 'GPL v3' |
| 2 |
__copyright__ = '2012, Darko Miletic <darko.miletic at gmail.com>' |
| 3 |
''' |
| 4 |
www.iol.co.za/news |
| 5 |
''' |
| 6 |
|
| 7 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 8 |
|
| 9 |
|
| 10 |
class IOL_za(BasicNewsRecipe): |
| 11 |
title = 'IOL News' |
| 12 |
__author__ = 'Darko Miletic' |
| 13 |
description = "South Africa's Premier Online News Source. Discover the world of IOL, News South Africa, Sport, Business, Financial, World News, Entertainment, Technology, Motoring, Travel, Property, Classifieds and more." # noqa: E501 |
| 14 |
publisher = 'Independent Newspapers (Pty) Limited.' |
| 15 |
category = 'news, politics, South Africa' |
| 16 |
oldest_article = 2 |
| 17 |
max_articles_per_feed = 200 |
| 18 |
no_stylesheets = True |
| 19 |
encoding = 'utf8' |
| 20 |
use_embedded_content = False |
| 21 |
auto_cleanup = False |
| 22 |
language = 'en_ZA' |
| 23 |
remove_empty_feeds = True |
| 24 |
publication_type = 'newsportal' |
| 25 |
masthead_url = 'http://www.iol.co.za/polopoly_fs/iol-news5-1.989381!/image/464471284.png_gen/derivatives/absolute/464471284.png' |
| 26 |
extra_css = ''' |
| 27 |
body{font-family: Arial,Helvetica,sans-serif } |
| 28 |
img{display: block} |
| 29 |
''' |
| 30 |
|
| 31 |
conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language} |
| 32 |
|
| 33 |
remove_tags = [dict(name=['object', 'embed', 'iframe', 'table', 'meta', 'link'])] |
| 34 |
keep_only_tags = [dict(attrs={'class': ['article_headers', 'byline', 'aticle_column']})] |
| 35 |
|
| 36 |
feeds = [ |
| 37 |
('News', 'http://iol.co.za/cmlink/1.640'), |
| 38 |
('Business', 'http://www.iol.co.za/cmlink/1.730910'), |
| 39 |
('Sport', 'http://iol.co.za/cmlink/sport-category-rss-1.704'), |
| 40 |
('World', 'http://iol.co.za/cmlink/news-world-category-rss-1.653'), |
| 41 |
('Africa', 'http://iol.co.za/cmlink/news-africa-category-rss-1.654'), |
| 42 |
] |