Debian Codegraph @

recipes/csid.recipe

raw
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 __license__ = 'GPL v3'
5 __copyright__ = '2011, Silviu Cotoar\u0103'
6 '''
7 csid.ro
8 '''
9
10 from calibre.web.feeds.news import BasicNewsRecipe
11
12
13 class CSID(BasicNewsRecipe):
14 title = 'Ce se \u00eent\u00e2mpl\u0103 doctore?'
15 __author__ = 'Silviu Cotoar\u0103'
16 description = 'Ce se \u00eent\u00e2mpl\u0103 doctore?'
17 publisher = 'CSID'
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,Reviste,Femei,Health,Beauty'
24 encoding = 'utf-8'
25 cover_url = 'http://www.csid.ro/images/default/csid.gif'
26
27 conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher}
28
29 keep_only_tags = [dict(name='div', attrs={'class': 'content floatleft'})]
30
31 remove_tags = [dict(name='div', attrs={'id': ['article_links']}), dict(name='div', attrs={'id': ['tags']}), dict(name='p', attrs={'id': ['tags']})]
32
33 remove_tags_after = [dict(name='p', attrs={'id': ['tags']})]
34
35 feeds = [('Feeds', 'http://www.csid.ro/rss/')]
36
37 def preprocess_html(self, soup):
38 return self.adeify_images(soup)