calibre/recipes/linux_magazine.recipe
Kovid Goyal 29cd8d64ea
Change shebangs to python from python2
Also remove a few other miscellaneous references to python2
2020-08-22 18:47:51 +05:30

41 lines
1.2 KiB
Python

#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008-2015 , Darko Miletic <darko.miletic at gmail.com>'
'''
linux-magazine.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class LinuxMagazine(BasicNewsRecipe):
title = 'Linux Magazine'
__author__ = 'Darko Miletic'
description = 'Linux news'
publisher = 'Linux Magazine'
category = 'news, linux, open source, software'
language = 'en'
encoding = 'utf-8'
oldest_article = 35
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
conversion_options = {
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
}
keep_only_tags = dict(
name='div', attrs={'class': lambda x: 'full' in (x or '').split()})
remove_tags_after = dict(name='div', attrs={'id': 'disqus_thread'})
remove_tags = [
dict(name='div', attrs={'class': ['attribute-relatedcontent',
'social_bookmarks',
'paginate']}), dict(name='div', attrs={'id': 'articlebox'})
]
feeds = [(u'Linux Magazine Full Feed',
u'http://www.linux-magazine.com/rss/feed/lmi_full')]