Debian Codegraph @

recipes/gsp.recipe

raw
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 __license__ = 'GPL v3'
5 __copyright__ = '2011, Silviu Cotoar\u0103'
6 '''
7 gsp.ro
8 '''
9
10 from calibre.web.feeds.news import BasicNewsRecipe
11
12
13 class GSP(BasicNewsRecipe):
14 title = 'Gazeta Sporturilor'
15 language = 'ro'
16 __author__ = 'Silviu Cotoar\u0103'
17 description = 'Gazeta Sporturilor'
18 publisher = 'Gazeta Sporturilor'
19 category = 'Ziare,Sport,Stiri,Romania'
20 oldest_article = 5
21 max_articles_per_feed = 100
22 no_stylesheets = True
23 use_embedded_content = False
24 encoding = 'utf-8'
25 remove_javascript = True
26 cover_url = 'http://www.gsp.ro/images/logo.jpg'
27
28 conversion_options = {'comments': description, 'tags': category, 'language': language, 'publisher': publisher}
29
30 keep_only_tags = [
31 dict(name='h1', attrs={'class': 'serif title_2'}),
32 dict(name='div', attrs={'id': 'only_text'}),
33 dict(name='span', attrs={'class': 'block poza_principala'}), # noqa: E501
34 ]
35
36 feeds = [('\u0218tiri', 'http://www.gsp.ro/rss.xml')]
37
38 def preprocess_html(self, soup):
39 return self.adeify_images(soup)