1#!/usr/local/bin/python3.8
2# -*- coding: utf-8 -*-
3
4__license__ = 'GPL v3'
5__copyright__ = u'2011, Silviu Cotoar\u0103'
6'''
7csid.ro
8'''
9
10from calibre.web.feeds.news import BasicNewsRecipe
11
12
13class CSID(BasicNewsRecipe):
14    title = u'Ce se \u00eent\u00e2mpl\u0103 doctore?'
15    __author__ = u'Silviu Cotoar\u0103'
16    description = u'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 = {
28        'comments': description, 'tags': category, 'language': language, 'publisher': publisher
29    }
30
31    keep_only_tags = [
32        dict(name='div', attrs={'class': 'content floatleft'})
33    ]
34
35    remove_tags = [
36        dict(name='div', attrs={'id': ['article_links']}), dict(
37            name='div', attrs={'id': ['tags']}), dict(name='p', attrs={'id': ['tags']})
38    ]
39
40    remove_tags_after = [
41        dict(name='p', attrs={'id': ['tags']})
42    ]
43
44    feeds = [
45        (u'Feeds', u'http://www.csid.ro/rss/')
46    ]
47
48    def preprocess_html(self, soup):
49        return self.adeify_images(soup)
50