| 1 |
# -*- coding: utf-8 -*- |
| 2 |
|
| 3 |
__license__ = 'GPLv3' |
| 4 |
|
| 5 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 6 |
|
| 7 |
|
| 8 |
class AdvancedUserRecipe1311450855(BasicNewsRecipe): |
| 9 |
title = 'Dagens Industri' |
| 10 |
__author__ = 'Jonas Svensson' |
| 11 |
description = 'Economy news from Sweden' |
| 12 |
publisher = 'DI' |
| 13 |
category = 'news, politics, Sweden' |
| 14 |
oldest_article = 2 |
| 15 |
delay = 1 |
| 16 |
max_articles_per_feed = 100 |
| 17 |
no_stylesheets = True |
| 18 |
use_embedded_content = False |
| 19 |
encoding = 'utf-8' |
| 20 |
language = 'sv' |
| 21 |
|
| 22 |
feeds = [('DI', 'https://di.se/rss')] |
| 23 |
|
| 24 |
keep_only_tags = [ |
| 25 |
dict(name='h1', attrs={'id': 'ctl00_ExtraWideContentRegion_WideContentRegion_MainRegion_MainContentRegion_MainBodyRegion_headlineNormal'}), |
| 26 |
dict(name='div', attrs={'id': 'articleBody'}), |
| 27 |
] # noqa: E501 |
| 28 |
|
| 29 |
remove_tags = [ |
| 30 |
dict(name='div', attrs={'class': 'article-actions clear'}), |
| 31 |
dict(name='div', attrs={'class': 'article-action-popup'}), |
| 32 |
dict(name='div', attrs={'class': 'header'}), |
| 33 |
dict(name='div', attrs={'class': 'content clear'}), |
| 34 |
dict(name='div', attrs={'id': 'articleAdvertisementDiv'}), |
| 35 |
dict(name='ul', attrs={'class': 'action-list'}), # noqa: E501 |
| 36 |
] |