calibre/recipes/financiarul.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

49 lines
1.5 KiB
Python

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = u'2011, Silviu Cotoar\u0103'
'''
financiarul.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Financiarul(BasicNewsRecipe):
title = u'Financiarul'
__author__ = u'Silviu Cotoar\u0103'
description = u'FIN.ro'
publisher = u'Financiarul'
oldest_article = 25
language = 'ro'
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
category = 'Ziare,Stiri'
encoding = 'utf-8'
cover_url = 'http://www.financiarul.com/templates/default/images/logo.png'
conversion_options = {
'comments': description, 'tags': category, 'language': language, 'publisher': publisher
}
keep_only_tags = [
dict(name='div', attrs={'class': 'col2ContentLeftL'})
]
remove_tags = [
dict(name='div', attrs={'class': ['infoArticol']}), dict(name='ul', attrs={'class': 'navSectiuni'}), dict(name='div', attrs={'class': 'separator separatorTop'}), dict(name='div', attrs={'class': 'infoArticol infoArticolBottom'}), dict(name='ul', attrs={'class': ['related']}), dict(name='div', attrs={'class': ['slot panel300 panelGri300 panelGri300s panelGri300sm']}) # noqa
]
remove_tags_after = [
dict(name='ul', attrs={'class': ['related']})
]
feeds = [
(u'Feeds', u'http://www.financiarul.com/rss')
]
def preprocess_html(self, soup):
return self.adeify_images(soup)