Debian Codegraph @

recipes/bucataras.recipe

raw
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 __license__ = 'GPL v3'
5 __copyright__ = '2011, Silviu Cotoar\u0103'
6 '''
7 bucataras.ro
8 '''
9
10 from calibre.web.feeds.news import BasicNewsRecipe
11
12
13 class Bucataras(BasicNewsRecipe):
14 title = 'Bucataras'
15 __author__ = 'Silviu Cotoar\u0103'
16 description = ''
17 publisher = 'Bucataras'
18 oldest_article = 5
19 language = 'ro'
20 max_articles_per_feed = 100
21 no_stylesheets = True
22 use_embedded_content = False
23 category = 'Ziare,Bucatarie,Retete'
24 encoding = 'utf-8'
25 cover_url = 'http://www.bucataras.ro/templates/default/images/pink/logo.jpg'
26
27 conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher}
28
29 keep_only_tags = [
30 dict(name='h1', attrs={'class': 'titlu'}),
31 dict(name='div', attrs={'class': 'contentL'}),
32 dict(name='div', attrs={'class': 'contentBottom'}),
33 ]
34
35 remove_tags = [
36 dict(name='div', attrs={'class': ['sociale']}),
37 dict(name='div', attrs={'class': ['contentR']}),
38 dict(name='a', attrs={'target': ['_self']}),
39 dict(name='div', attrs={'class': ['comentarii']}),
40 ]
41
42 remove_tags_after = [dict(name='div', attrs={'class': ['comentarii']})]
43
44 feeds = [('Feeds', 'http://www.bucataras.ro/rss/retete/')]
45
46 def preprocess_html(self, soup):
47 return self.adeify_images(soup)