| 1 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 2 |
|
| 3 |
|
| 4 |
class AdvancedUserRecipe1305470859(BasicNewsRecipe): |
| 5 |
title = 'Impulse.de' |
| 6 |
language = 'de' |
| 7 |
__author__ = 'schuster' |
| 8 |
oldest_article = 14 |
| 9 |
max_articles_per_feed = 100 |
| 10 |
no_stylesheets = True |
| 11 |
remove_javascript = True |
| 12 |
use_embedded_content = False |
| 13 |
cover_url = 'http://www.bvk.de/files/image/bilder/Logo%20Impulse.jpg' |
| 14 |
|
| 15 |
extra_css = ''' |
| 16 |
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;} |
| 17 |
h4{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;} |
| 18 |
img {min-width:300px; max-width:600px; min-height:300px; max-height:800px} |
| 19 |
p{font-family:Arial,Helvetica,sans-serif;font-size:small;} |
| 20 |
body{font-family:Helvetica,Arial,sans-serif;font-size:small;} |
| 21 |
''' |
| 22 |
|
| 23 |
def print_version(self, url): |
| 24 |
return url.replace('#utm_source=rss2&utm_medium=rss_feed&utm_campaign=/', '?mode=print') |
| 25 |
|
| 26 |
remove_tags_bevor = [dict(name='h1', attrs={'class': 'h2'})] |
| 27 |
remove_tags_after = [dict(name='div', attrs={'class': 'artikelfuss'})] |
| 28 |
|
| 29 |
feeds = [('impulstest', 'http://www.impulse.de/rss/')] |
| 30 |
|
| 31 |
remove_tags = [ |
| 32 |
dict(attrs={'class': ['navSeitenAlle', 'kommentieren', 'teaserheader', 'teasercontent', 'info', 'zwischenhead', 'kasten_artikel']}), |
| 33 |
dict( |
| 34 |
id=['metaNav', 'impKopf', 'impTopNav', 'impSubNav', 'footerRahmen', 'gatrixx_marktinformationen', 'pager', 'weitere', 'socialmedia', 'rating_open'] |
| 35 |
), |
| 36 |
dict(span=['ratingtext', 'Gesamtranking', 'h3', '']), |
| 37 |
dict(rel=['canonical']), |
| 38 |
] |