Junior Member
Posts: 6
Karma: 10
Join Date: Jul 2013
Device: kindle 4
Recipe for Le Nouvel Obs, Le GORAFI.fr, gamekult.com and jeuxvideo.com [FR]
Hello, i have made four little recipe for french news websites.
Le Nouvel Observateur is a weekly french newsmagazine.
Le GORAFI.fr is a french news satire website, all the news made are fake.
Gamekult.com and Jeuxvideo.com are french websites specialized information in the video games.
http://tempsreel.nouvelobs.com/ Spoiler :
Code:
__license__ = 'GPL v3'
__copyright__ = '2013, Malah <malah at neuf dot fr>'
'''
Le Nouvel Observateur
'''
__author__ = '2013, Malah <malah at neuf dot fr>'
class LeNouvelObs(BasicNewsRecipe):
title = u'Le Nouvel Observateur'
__author__ = 'Malah'
description = u'Actualités en temps réel, Info à la Une'
oldest_article = 1
language = 'fr'
max_articles_per_feed = 25
use_embedded_content = False
ignore_duplicate_articles = ('title', 'url')
remove_empty_feeds = True
no_stylesheets = True
masthead_url = u'https://upload.wikimedia.org/wikipedia/fr/f/f9/Le_Nouvel_observateur.png'
feeds = [
(u'Politique', u'http://tempsreel.nouvelobs.com/politique/rss.xml'),
(u'Société', u'http://tempsreel.nouvelobs.com/societe/rss.xml'),
(u'Monde', u'http://tempsreel.nouvelobs.com/monde/rss.xml'),
(u'Economie', u'http://tempsreel.nouvelobs.com/economie/rss.xml'),
(u'Culture', u'http://tempsreel.nouvelobs.com/culture/rss.xml'),
(u'High Tech', u'http://obsession.nouvelobs.com/high-tech/rss.xml'),
(u'Education', u'http://tempsreel.nouvelobs.com/education/rss.xml'),
(u'Services', u'http://tempsreel.nouvelobs.com/services/rss.xml'),
(u'Sport', u'http://tempsreel.nouvelobs.com/sport/rss.xml'),
(u'CinéObs', u'http://cinema.nouvelobs.com/articles.rss'),
(u'TéléObs', u'http://teleobs.nouvelobs.com/rss.xml'),
(u'Autres Actualités',u'http://tempsreel.nouvelobs.com/rss.xml'),
]
keep_only_tags = [
dict(name='h1', attrs={'id':'obs-article-title'}),
dict(name='div', attrs={'class':'obs-date'}),
dict(name='div', attrs={'class':'art-auteur'}),
dict(name='h2', attrs={'class':'obs-article-intro'}),
dict(name='div', attrs={'id':'obs-article-keywords'}),
dict(name='div', attrs={'id':'obs-article-mainpic'}),
dict(name='div', attrs={'itemprop':'articleBody'}),
dict(name='img', attrs={'id':'ObsImg'}),
dict(name='p', attrs={'class':'date-media'}),
dict(name='p', attrs={'id':'ObsDesc'}),
]
Download :
https://www.dropbox.com/s/lg5sk4jg4d...0130806.recipe
http://www.legorafi.fr/ Spoiler :
Code:
__license__ = 'GPL v3'
__copyright__ = '2013, Malah <malah at neuf dot fr>'
'''
Le GORAFI.fr
'''
__author__ = '2013, Malah <malah at neuf dot fr>'
class legorafi(BasicNewsRecipe):
title = u'Le GORAFI.fr'
__author__ = 'Malah'
description = u'Depuis 1826, toute l\'information de sources contradictoires'
oldest_article = 7
language = 'fr'
max_articles_per_feed = 100
use_embedded_content = False
no_stylesheets = True
keep_only_tags = [
dict(name='div', attrs={'class':'entry-content'}),
dict(name='h3', attrs={'id':'comments-title'}),
]
remove_tags = [
dict(name='div', attrs={'id':'soshake-sharebox'}),
dict(name='div', attrs={'class':'social-ring'}),
dict(name='div', attrs={'class':'entry-utility'}),
dict(name='div', attrs={'id':'respond'}),
]
masthead_url = u'http://web.gweno.free.fr/img/logositeter.png'
couverture_url = u'http://www.legorafi.fr/wp-content/uploads/2013/02/iconegorafi.png'
feeds = [
(u'Articles', u'http://www.legorafi.fr/feed/'),
]
Download :
https://www.dropbox.com/s/8053h8jqk4...0130806.recipe
http://www.gamekult.com/ Spoiler :
Code:
__license__ = 'GPL v3'
__copyright__ = '2013, Malah <malah at neuf dot fr>'
'''
Gamekult.com
'''
__author__ = '2013, Malah <malah at neuf dot fr>'
class GamekultCom(BasicNewsRecipe):
title = u'Gamekult.com'
__author__ = 'Malah'
description = u'Toute l`actualité du jeu vidéo PC, consoles, mobiles.'
oldest_article = 1.5
language = 'fr'
max_articles_per_feed = 100
remove_empty_feeds = True
use_embedded_content = False
no_stylesheets = True
ignore_duplicate_articles = {'title', 'url'}
keep_only_tags = [dict(id=['story-page','story-body'])]
remove_tags = [
dict(name='div', attrs={'class':'sharebar'}),
dict(name='object', attrs={'type':'application/x-shockwave-flash'}),
dict(name='span', attrs={'class':'share'}),
dict(name='div', attrs={'class':'story-pagination'}),
dict(name='div', attrs={'class':'pagination pagination-centered'}),
]
masthead_url = u'https://upload.wikimedia.org/wikipedia/fr/9/9c/Logo_-_GAMEKULT.png'
feeds = [
('Test', u'http://www.gamekult.com/feeds/test.html'),
('Actu', u'http://www.gamekult.com/feeds/actu.html'),
]
Download :
https://www.dropbox.com/s/zlvpyhldvd...0130806.recipe
http://www.jeuxvideo.com/ Spoiler :
Code:
__license__ = 'GPL v3'
__copyright__ = '2013, Malah <malah at neuf dot fr>'
'''
JeuxVideo.com
'''
__author__ = '2013, Malah <malah at neuf dot fr>'
class JeuxVideoCom(BasicNewsRecipe):
title = 'JeuxVideo.com'
__author__ = 'Malah'
description = 'La Référence des Jeux Vidéo sur PC et Consoles !'
oldest_article = 1.5
language = 'fr'
max_articles_per_feed = 100
remove_empty_feeds = True
use_embedded_content = False
no_stylesheets = True
ignore_duplicate_articles = {'title', 'url'}
keep_only_tags = [dict(id=['news_detail','test_txt','test_avis'])]
remove_tags = [
dict(name='div', attrs={'id':'player_video_article'}),
dict(name='div', attrs={'class':'liste-fiches'})
]
masthead_url = u'https://upload.wikimedia.org/wikipedia/commons/3/39/Jeuxvideocom.png'
feeds = [
(u'Section PC',u'http://www.jeuxvideo.com/rss/rss-pc.xml'),
(u'Section Xbox 360',u'http://www.jeuxvideo.com/rss/rss-360.xml'),
(u'Section PlayStation 3',u'http://www.jeuxvideo.com/rss/rss-ps3.xml'),
(u'Section Wii U',u'http://www.jeuxvideo.com/rss/rss-wiiu.xml'),
(u'Section Wii',u'http://www.jeuxvideo.com/rss/rss-wii.xml'),
(u'Section Nintendo 3DS',u'http://www.jeuxvideo.com/rss/rss-3ds.xml'),
(u'Section Nintendo DS',u'http://www.jeuxvideo.com/rss/rss-ds.xml'),
(u'Section PlayStation Vita',u'http://www.jeuxvideo.com/rss/rss-vita.xml'),
(u'Section PlayStation Protable',u'http://www.jeuxvideo.com/rss/rss-psp.xml'),
(u'Section Android',u'http://www.jeuxvideo.com/rss/rss-android.xml'),
(u'Section Iphone',u'http://www.jeuxvideo.com/rss/rss-iphone.xml'),
(u'Section Web',u'http://www.jeuxvideo.com/rss/rss-wb.xml'),
(u'Autres news', u'http://www.jeuxvideo.com/rss/rss-news.xml'),
(u'Autres vidéos', u'http://www.jeuxvideo.com/rss/rss-videos.xml'),
(u'Autres articles', u'http://www.jeuxvideo.com/rss/rss.xml'),
]
Download :
https://www.dropbox.com/s/htepuseznu...0130806.recipe