Hi everybody,
I'm new here, even if I use Calibre for several years.
I use it mainly for ebooks imports and news.
On the news side, I try to add a new source : lesechos.fr which is a well known economics journal in France.
I tried to get inspiration from a recipe made for the irishtimes.com, since lesechos.fr uses feedsportal as well. But I can't make it to work... I need help from the community !
Could you give me a hand with this one ? Here is my recipe :
import re
from calibre.web.feeds.news import BasicNewsRecipe
class LesEchos(BasicNewsRecipe):
title = u'Les Echos'
__author__ = "JM"
language = 'en_IE'
timefmt = ' (%A, %B %d, %Y)'
oldest_article = 3
no_stylesheets = True
simultaneous_downloads= 1
'''
http://rss.feedsportal.com/c/499/f/4...0A/story01.htm
http://www.lesechos.fr/economie-poli...?xtor=RSS-2010
r = re.compile('.*(?P<url>http:\/\/(
http://www.lesechos.fr)|(rss.feedspo...\/.*\.html?).*')
'''
remove_tags = [dict(name='div', attrs={'class':'footer'})]
feeds = [(u'Economie France', u'http://syndication.lesechos.fr/rss/rss_france.xml')]
def print_version(self, url):
u = 'http://www.lesechos.fr' + (((url[77:].replace('0Bphp0Dxtor0FRSS0E20A10A/story01.htm','.php?xtor=RSS-2010')).replace('0C','/')).replace('0A','0')).replace('0E','-')
print 'DEBUG1 : ' + url
print 'DEBUG2 : ' + u
return u
def get_article_url(self, article):
return article.link
Thanks a lot for your help !