View Single Post
Old 10-03-2015, 08:39 PM   #2
ryanshanabarger
Junior Member
ryanshanabarger began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2015
Device: Kindle Voyage
For the record, here is the full recipe I'm trying to use. Some of the titles look weird, but that's just how the french accents are translated. I've tried it without them and get the same result. The ones that won't download are Technology and American Elections.

Code:
#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1443900970(BasicNewsRecipe):
    title          = 'Le Monde'
    oldest_article = 7
    max_articles_per_feed = 100
    auto_cleanup   = True
    no_stylesheets = True
    auto_cleanup_keep = '//div[@class="thumbnail"]'

    feeds          = [
        ('A la une', 'http://www.lemonde.fr/rss/une.xml'),
        ('Actu', 'http://www.lemonde.fr/m-actu/rss_full.xml'),
        ('Am\xe9riques', 'http://www.lemonde.fr/ameriques/rss_full.xml'),
        ('\xc9lections am\xe9ricaines', 'http://www.lemonde.fr/elections-americaines/rss_full.xml'),
        (u'Technologies', u'http://www.lemonde.fr/technologies/rss_full.xml'),
        ('Sciences', 'http://www.lemonde.fr/sciences/rss_full.xml'),
        ('International', 'http://www.lemonde.fr/international/rss_full.xml'),
        ('Europe', 'http://www.lemonde.fr/europe/rss_full.xml'),
        ('Soci\xe9t\xe9', 'http://www.lemonde.fr/societe/rss_full.xml'),
        ('Economie', 'http://www.lemonde.fr/economie/rss_full.xml'),
    ]
    
    def get_cover_url(self):
        cover = 'http://imagesociale.fr/wp-content/uploads/lemonde-1301151.jpg'
        return cover
    masthead_url = 'http://www.resistnetwork.com/assets/shared/images/journal/Le-Monde-newspaper-logo.jpg'

Last edited by kovidgoyal; 10-03-2015 at 11:17 PM.
ryanshanabarger is offline   Reply With Quote