Debian Codegraph @

recipes/bianet.recipe

raw
1 __license__ = 'GPL v3'
2 __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
3 '''
4 bianet.com.tr
5 '''
6
7 from calibre.web.feeds.news import BasicNewsRecipe
8
9
10 class Radikal_tr(BasicNewsRecipe):
11 title = 'Bianet'
12 __author__ = 'Osman Kaysan'
13 description = 'Independent News from Turkey'
14 publisher = 'Bianet'
15 category = 'news, politics, Turkey'
16 oldest_article = 7
17 max_articles_per_feed = 120
18 masthead_url = 'http://bianet.org/images/bianet_logo.gif'
19 language = 'tr'
20 no_stylesheets = True
21
22 conversion_options = {
23 'comments': description,
24 'tags': category,
25 'language': language,
26 'publisher': publisher,
27 'linearize_tables': True,
28 'remove_paragraph_spacing': True,
29 }
30
31 remove_tags_before = dict(name='div', attrs={'class': 'manset'})
32 remove_tags = [
33 dict(name='ul', attrs={'class': ['altul']}),
34 dict(name='div', attrs={'id': ['habermenu']}),
35 dict(name='div', attrs={'class': ['mail']}),
36 dict(name='div', attrs={'class': ['from']}),
37 ]
38 remove_tags_after = dict(name='div', attrs={'id': 'habermenu'})
39
40 feeds = [('Bianet', 'http://bianet.org/bianet.rss')]
41
42 def preprocess_html(self, soup):
43 return self.adeify_images(soup)