Debian Codegraph @

recipes/linux_magazine.recipe

raw
1 #!/usr/bin/env python
2
3 __license__ = 'GPL v3'
4 __copyright__ = '2008-2015 , Darko Miletic <darko.miletic at gmail.com>'
5 '''
6 linux-magazine.com
7 '''
8
9 from calibre.web.feeds.news import BasicNewsRecipe
10
11
12 class LinuxMagazine(BasicNewsRecipe):
13 title = 'Linux Magazine'
14 __author__ = 'Darko Miletic'
15 description = 'Linux news'
16 publisher = 'Linux Magazine'
17 category = 'news, linux, open source, software'
18 language = 'en'
19 encoding = 'utf-8'
20 oldest_article = 35
21 max_articles_per_feed = 100
22 no_stylesheets = True
23 use_embedded_content = False
24
25 conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language}
26
27 keep_only_tags = dict(name='div', attrs={'class': lambda x: 'full' in (x or '').split()})
28
29 remove_tags_after = dict(name='div', attrs={'id': 'disqus_thread'})
30 remove_tags = [
31 dict(name='div', attrs={'class': ['attribute-relatedcontent', 'social_bookmarks', 'paginate']}),
32 dict(name='div', attrs={'id': 'articlebox'}),
33 ]
34
35 feeds = [('Linux Magazine Full Feed', 'http://www.linux-magazine.com/rss/feed/lmi_full')]