/
cosmopolitan_de.recipe
36 lines (34 loc) · 1.86 KB
/
cosmopolitan_de.recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1305567197(BasicNewsRecipe):
title = u'Cosmopolitan.de'
__author__ = 'schuster'
oldest_article = 7
language = 'de'
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
remove_javascript = True
cover_url = 'http://www.cosmopolitan.com/cm/shared/site_images/print_this/cosmopolitan_logo.gif'
remove_tags_before = dict(name='h1', attrs={'class': 'artikel'})
remove_tags_after = dict(name='div', attrs={'class': 'morePages'})
extra_css = '''
h2{font-family:Arial,Helvetica,sans-serif; font-size: x-small;}
h1{ font-family:Arial,Helvetica,sans-serif; font-size:x-large; font-weight:bold;}
'''
remove_tags = [dict(id='strong'),
dict(title='strong'),
dict(name='span'),
dict(name='li', attrs={'class': 'large'}),
dict(name='ul', attrs={
'class': 'articleImagesPortrait clearfix'}),
dict(name='p', attrs={'class': 'external'}),
dict(name='a', attrs={'target': '_blank'}), ]
feeds = [(u'Komplett', u'http://www.cosmopolitan.de/rss/allgemein.xml'),
(u'Mode', u'http://www.cosmopolitan.de/rss/mode.xml'),
(u'Beauty', u'http://www.cosmopolitan.de/rss/beauty.xml'),
(u'Liebe&Sex', u'http://www.cosmopolitan.de/rss/liebe.xml'),
(u'Psychologie', u'http://www.cosmopolitan.de/rss/psychologie.xml'),
(u'Job&Karriere', u'http://www.cosmopolitan.de/rss/job.xml'),
(u'Lifestyle', u'http://www.cosmopolitan.de/rss/lifestyle.xml'),
(u'Shopping', u'http://www.cosmopolitan.de/rss/shopping.xml'),
(u'Bildergalerien', u'http://www.cosmopolitan.de/rss/bildgalerien.xml')]