calibre/recipes/neowin.recipe
Kovid Goyal 567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30

40 lines
1.2 KiB
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class Neowin(BasicNewsRecipe):
title = u'Neowin.net'
oldest_article = 5
language = 'en'
description = 'News from IT'
publisher = 'Neowin'
category = 'news, IT, Microsoft, Apple, hardware, software, games'
__author__ = 'Darko Miletic'
max_articles_per_feed = 100
no_stylesheets = True
encoding = 'utf8'
conversion_options = {
'tags': category, 'language': language, 'comments': description, 'publisher': publisher
}
keep_only_tags = [dict(name='div', attrs={'id': 'article'})]
remove_tags_after = dict(name='div', attrs={'id': 'tag-bar'})
remove_tags = [
dict(name=['base', 'object', 'link', 'iframe']), dict(
name='div', attrs={'id': 'tag-bar'})
]
feeds = [
(u'Software', u'http://www.neowin.net/news/rss/software'),
(u'Gaming', u'http://www.neowin.net/news/rss/gaming'),
(u'Microsoft', u'http://www.neowin.net/news/rss/microsoft'),
(u'Apple', u'http://www.neowin.net/news/rss/apple'),
(u'Editorial', u'http://www.neowin.net/news/rss/editorial')
]
def image_url_processor(cls, baseurl, url):
return url