1#!/usr/local/bin/python3.8
2# -*- coding: utf-8 -*-
3
4__license__ = 'GPL v3'
5__copyright__ = u'2011, Silviu Cotoar\u0103'
6'''
7gandul.info
8'''
9
10from calibre.web.feeds.news import BasicNewsRecipe
11
12
13class Gandul(BasicNewsRecipe):
14    title = u'G\u00E2ndul'
15    __author__ = u'Silviu Cotoar\u0103'
16    publisher = 'Gandul'
17    description = 'Cotidian Online'
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,Stiri,Romania'
24    encoding = 'utf-8'
25    cover_url = 'http://storage0.dms.mpinteractiv.ro/media/1/1/1706/1064063/1/logo.jpg?width=400'
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': 'article'})
33    ]
34
35    remove_tags = [
36        dict(name='a', attrs={'class': 'photo'}), dict(
37            name='div', attrs={'class': 'ad'})
38    ]
39
40    feeds = [
41        (u'\u0218tiri', u'http://www.gandul.info/rss-stiri-prima-pagina.xml')
42    ]
43
44    def preprocess_html(self, soup):
45        return self.adeify_images(soup)
46