View Single Post
Old 05-20-2011, 04:39 PM   #1
xXxXxXxXxXx
Enthusiast
xXxXxXxXxXx began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
recipe for Deutsche Welle (Deutsch als Fremdsprache

This recipe is for German learners (like me)
provide access to text (simpler than normal) specialty designed to this purpose


Code:
class AdvancedUserRecipe1305567197(BasicNewsRecipe):
    title          = u'Deutsche Welle (Deutsch als Fremdsprache)'
    __author__  = 'xXxXxXxXxXx'
    oldest_article = 7
    max_articles_per_feed = 1000
    no_stylesheets         = True
    use_embedded_content   = False
    remove_javascript      = True
    cover_url = 'http://www.dw-world.de/skins/std/channel1/pics/dw_logo1024.gif'
    keep_only_tags = [
                              dict(name='div', attrs={'id':['mainContent']}) ]

    remove_tags = [dict(name='p', attrs={'class':'actionFooter'}),
                            dict(name='div', attrs={'class':'socialBookmarks'}),
                            dict(name='div', attrs={'class':'mediaLink symDW'}),
                            dict(name='div', attrs={'class':'mediaLink symAudioVideo'}),
                            dict(name='div', attrs={'class':'mediaLink symExtern'}),
                            dict(name='div', attrs={'class':'mediaLink symDownload'}),
                            dict(name='div', attrs={'class':'mediaLink symFeedback'}),
                            dict(name='div', attrs={'class':'dossierLinkTitle'}),  
                            dict(name='div', attrs={'class':'mediaLink symDW dossierLinks'}),
                            dict(name='div', attrs={'class':'linkLine'}),
                            dict(name='div', attrs={'class':'linkLine'}),
                            dict(name='div', attrs={'class':'mediaLink symSurvey'})
                            ]
   
    feeds          = [	(u'Deutsch im Fokus', u'http://rss.dw-world.de/atom/DKfeed_dif_de'),
                                        (u'Alltagsdeutsch', u'http://rss.dw-world.de/atom/DKfeed_alltagsdeutsch_de'),
                                        (u'Wort der Woche', u'http://rss.dw-world.de/atom/DKfeed_wortderwoche_de'),
                                        (u'Sprachbar', u'http://rss.dw-world.de/atom/DKfeed_sprachbar_de'),
                                        (u'Stichwort', u'http://rss.dw-world.de/atom/DKfeed_stichwort_de'),
                                        (u'Top-Thema mit Vokabeln', u'http://rss.dw-world.de/atom/DKfeed_topthemamitvokabeln_dee'),
                                        (u'Langsam gesprochene Nachrichten', u'http://rss.dw-world.de/atom/DKfeed_lgn_de'),
		]
xXxXxXxXxXx is offline   Reply With Quote