Debian Codegraph @

recipes/neowin.recipe

raw
1 from calibre.web.feeds.news import BasicNewsRecipe
2
3
4 class Neowin(BasicNewsRecipe):
5 title = 'Neowin.net'
6 oldest_article = 5
7 language = 'en'
8 description = 'News from IT'
9 publisher = 'Neowin'
10 category = 'news, IT, Microsoft, Apple, hardware, software, games'
11 __author__ = 'Darko Miletic'
12 max_articles_per_feed = 100
13 no_stylesheets = True
14 encoding = 'utf8'
15
16 conversion_options = {'tags': category, 'language': language, 'comments': description, 'publisher': publisher}
17
18 keep_only_tags = [dict(name='div', attrs={'id': 'article'})]
19 remove_tags_after = dict(name='div', attrs={'id': 'tag-bar'})
20
21 remove_tags = [dict(name=['base', 'object', 'link', 'iframe']), dict(name='div', attrs={'id': 'tag-bar'})]
22
23 feeds = [
24 ('Software', 'http://www.neowin.net/news/rss/software'),
25 ('Gaming', 'http://www.neowin.net/news/rss/gaming'),
26 ('Microsoft', 'http://www.neowin.net/news/rss/microsoft'),
27 ('Apple', 'http://www.neowin.net/news/rss/apple'),
28 ('Editorial', 'http://www.neowin.net/news/rss/editorial'),
29 ]
30
31 def image_url_processor(cls, baseurl, url):
32 return url