| 1 |
from __future__ import unicode_literals |
| 2 |
|
| 3 |
__license__ = 'GPL v3' |
| 4 |
__copyright__ = '2013, Malah <malah at neuf dot fr>' |
| 5 |
''' |
| 6 |
Le Nouvel Observateur |
| 7 |
''' |
| 8 |
|
| 9 |
__author__ = '2013, Malah <malah at neuf dot fr>' |
| 10 |
|
| 11 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 12 |
|
| 13 |
|
| 14 |
class LeNouvelObs(BasicNewsRecipe): |
| 15 |
title = 'Le Nouvel Observateur' |
| 16 |
__author__ = 'Malah' |
| 17 |
description = 'Actualités en temps réel, Info à la Une' |
| 18 |
oldest_article = 1 |
| 19 |
language = 'fr' |
| 20 |
max_articles_per_feed = 25 |
| 21 |
use_embedded_content = False |
| 22 |
ignore_duplicate_articles = ('title', 'url') |
| 23 |
remove_empty_feeds = True |
| 24 |
no_stylesheets = True |
| 25 |
masthead_url = 'https://upload.wikimedia.org/wikipedia/fr/f/f9/Le_Nouvel_observateur.png' |
| 26 |
feeds = [ |
| 27 |
('Politique', 'http://tempsreel.nouvelobs.com/politique/rss.xml'), |
| 28 |
('Société', 'http://tempsreel.nouvelobs.com/societe/rss.xml'), |
| 29 |
('Monde', 'http://tempsreel.nouvelobs.com/monde/rss.xml'), |
| 30 |
('Economie', 'http://tempsreel.nouvelobs.com/economie/rss.xml'), |
| 31 |
('Culture', 'http://tempsreel.nouvelobs.com/culture/rss.xml'), |
| 32 |
('High Tech', 'http://obsession.nouvelobs.com/high-tech/rss.xml'), |
| 33 |
('Education', 'http://tempsreel.nouvelobs.com/education/rss.xml'), |
| 34 |
('Services', 'http://tempsreel.nouvelobs.com/services/rss.xml'), |
| 35 |
('Sport', 'http://tempsreel.nouvelobs.com/sport/rss.xml'), |
| 36 |
('CinéObs', 'http://cinema.nouvelobs.com/articles.rss'), |
| 37 |
('TéléObs', 'http://teleobs.nouvelobs.com/rss.xml'), |
| 38 |
('Autres Actualités', 'http://tempsreel.nouvelobs.com/rss.xml'), |
| 39 |
] |
| 40 |
keep_only_tags = [ |
| 41 |
dict(name='h1', attrs={'id': 'obs-article-title'}), |
| 42 |
dict(name='div', attrs={'class': 'obs-date'}), |
| 43 |
dict(name='div', attrs={'class': 'art-auteur'}), |
| 44 |
dict(name='h2', attrs={'class': 'obs-article-intro'}), |
| 45 |
dict(name='div', attrs={'id': 'obs-article-keywords'}), |
| 46 |
dict(name='div', attrs={'id': 'obs-article-mainpic'}), |
| 47 |
dict(name='div', attrs={'itemprop': 'articleBody'}), |
| 48 |
dict(name='img', attrs={'id': 'ObsImg'}), |
| 49 |
dict(name='p', attrs={'class': 'date-media'}), |
| 50 |
dict(name='p', attrs={'id': 'ObsDesc'}), |
| 51 |
] |