calibre/recipes/ecuisine.recipe

56 lines
2.0 KiB
Plaintext

# -*- coding: utf-8 -*-
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = u'2011, Silviu Cotoar\u0103'
'''
ecuisine.ro
'''
from calibre.web.feeds.news import BasicNewsRecipe
class EcuisineRo(BasicNewsRecipe):
title = u'eCuisine'
__author__ = u'Silviu Cotoar\u0103'
description = u'Reinventeaz\u0103 pl\u0103cerea de a g\u0103ti'
publisher = 'eCuisine'
oldest_article = 50
language = 'ro'
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
category = 'Ziare,Retete,Bucatarie'
encoding = 'utf-8'
cover_url = 'http://www.ecuisine.ro/sites/all/themes/ecuisine/images/logo.gif'
conversion_options = {
'comments' : description
,'tags' : category
,'language' : language
,'publisher' : publisher
}
keep_only_tags = [
dict(name='h1', attrs={'id':'page-title'})
, dict(name='div', attrs={'class':'field-item even'})
]
remove_tags = [
dict(name='ul', attrs={'id':['recipe-tabs']})
, dict(name='div', attrs={'class':['recipe-body-rating clearfix']})
, dict(name='div', attrs={'class':['recipe-body-flags']})
, dict(name='div', attrs={'id':['tweetmeme_button']})
, dict(name='div', attrs={'class':['fbshare']})
, dict(name='a', attrs={'class':['button-rounded']})
, dict(name='div', attrs={'class':['recipe-body-related']})
, dict(name='div', attrs={'class':['fbshare']})
, dict(name='div', attrs={'class':['link-wrapper']})
]
feeds = [
(u'Feeds', u'http://www.ecuisine.ro/rss')
]
def preprocess_html(self, soup):
return self.adeify_images(soup)